Skip to content

Antalya 26.8: Record elapsed_microseconds for S3 conditional and batch deletes in system.blob_storage_log - #2999

Open
sks wants to merge 1 commit into
Altinity:antalya-26.8from
stackgenhq:fix/antalya-26.8/s3-delete-blob-storage-log-stopwatch
Open

sks wants to merge 1 commit into
Altinity:antalya-26.8from
stackgenhq:fix/antalya-26.8/s3-delete-blob-storage-log-stopwatch

Conversation

@sks

@sks sks commented Dec 3, 2026

Copy link
Copy Markdown

Addresses the system.blob_storage_log delete duration follow-up noted in #2534 (comment):

"Three call sites in S3ObjectStorage.cpp pass a literal 0 as elapsed_microseconds... The upstream helpers measure it (deleteFileFromS3.cpp:46 per request, deleteFileFromS3.cpp:165 request time divided by the number of keys). Request: a Stopwatch around the request at these sites; for a batch, the request time divided by the number of keys, so the column means the same in every Delete row... Lines 839 and 933 are already in antalya-26.8 and can go in a separate small PR."

Changes

  • S3ObjectStorage.cpp:
    • In S3ObjectStorage::removeObjectIfTokenMatchesImpl: measure used_client->DeleteObject(request) with Stopwatch and pass elapsed to blob_storage_log->addEvent(...) instead of a literal 0.
    • In S3ObjectStorage::removeObjectsIfExistImpl: measure used_client->DeleteObjects(request) with Stopwatch and pass elapsed / objects.size() (along with a shared time_now timestamp across the batch's rows, matching src/IO/S3/deleteFileFromS3.cpp:151-169) to blob_storage_log->addEvent(...) instead of a literal 0.

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Record elapsed_microseconds for S3 conditional and batch deletes in system.blob_storage_log instead of logging 0.

Documentation entry for user-facing changes

  • Documentation is written (internal system.blob_storage_log instrumentation fix)

CI/CD Options

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Unit tests
  • Performance tests
  • Aarch64 tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All Regression
  • Disable CI Cache

…s in system.blob_storage_log

Measure `elapsed_microseconds` with `Stopwatch` around `DeleteObject` in
`S3ObjectStorage::removeObjectIfTokenMatchesImpl` and `DeleteObjects` in
`S3ObjectStorage::removeObjectsIfExistImpl` (dividing batch elapsed time
by `objects.size()` and passing shared `time_now`, matching
`src/IO/S3/deleteFileFromS3.cpp`) instead of logging a literal `0` to
`system.blob_storage_log` (follow-up noted in Altinity#2534).

Signed-off-by: sabith <sks@stackgen.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sks
sks marked this pull request as ready for review December 3, 2026 01:30
@filimonov filimonov added the CAS label Dec 3, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants