Skip to content

Azure: log batch-delete events when SubmitBatch itself fails - #112873

Merged
arsenmuk merged 3 commits into
masterfrom
arsenmuk/az-batch-delete-log
Aug 18, 2026
Merged

arsenmuk merged 3 commits into
masterfrom
arsenmuk/az-batch-delete-log

Conversation

@arsenmuk

@arsenmuk arsenmuk commented Aug 1, 2026 •

Copy link
Copy Markdown
Member

Series: #112871 -> #112873 (this), #112872, #112874, #112875, #112876

Problem. When the batch SubmitBatch delete request itself fails, the per-object response loop is skipped, so zero system.blob_storage_log Delete events are recorded for the whole batch. Failure scenario:

removeObjectsBatchIfExists: SubmitBatch() throws (e.g. 403 on the batch endpoint)
  -> per-object GetResponse() loop skipped -> 0 Delete events logged

Fix. Record a Delete event per object on batch-level failure before rethrowing.

Changes.

  • Disks/…/AzureBlobStorage/AzureObjectStorage::removeObjectsBatchIfExists: emit per-object blob_storage_log Delete events on SubmitBatch failure.
  • tests/integration/test_azure_403_handling: batch-delete-logging test + configs/blob_log.xml.

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 into CHANGELOG.md):

Fixed Azure batch object deletion recording no system.blob_storage_log Delete events when the batch request itself failed, leaving the whole batch unlogged. A Delete event is now recorded for each object on a batch-level failure.

Version info

  • Merged into: 26.8.1.1639 (included in 26.8 and later)

@clickhouse-gh

clickhouse-gh Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [738da31]

Summary: ✅


AI Review

Summary

This PR makes Azure batch deletes record one system.blob_storage_log Delete event per object when SubmitBatch itself fails, preserves the real Azure status for Azure::Storage::StorageException, falls back to error_code = -1 for non-Azure exceptions, and counts failed batches in AzureDeleteObjects / DiskAzureDeleteObjects. The current code matches that contract, the previously raised review issues are fixed in the current tree, and the added integration coverage exercises the 403, non-Azure, and profile-event regressions. No new review findings.

Missing context / blind spots
  • ⚠️ I did not run the integration tests locally. This review is based on the current code, the PR discussion, and the available CI summary; in this checkout the PR report exposed only the Build profile diff report.
Final Verdict
  • Status: ✅ Approve

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.70% 86.70% +0.00%
Functions 92.00% 92.00% +0.00%
Branches 79.10% 79.10% +0.00%

Changed lines: Changed C/C++ lines covered: 21/21 (100.00%) · Uncovered code

Full report · Diff report

@clickhouse-gh

clickhouse-gh Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.50% 86.50% +0.00%
Functions 91.90% 91.90% +0.00%
Branches 78.70% 78.70% +0.00%

Changed lines: Changed C/C++ lines covered: 51/62 (82.26%) · Uncovered code

Full report · Diff report

@arsenmuk
arsenmuk force-pushed the arsenmuk/az-transient-not-broken-part branch from 77e50f7 to f9d6177 Compare August 5, 2026 09:25
@arsenmuk
arsenmuk force-pushed the arsenmuk/az-batch-delete-log branch from d07f19d to a0f1ed4 Compare August 5, 2026 09:49
@SmitaRKulkarni SmitaRKulkarni self-assigned this Aug 10, 2026
@arsenmuk
arsenmuk marked this pull request as ready for review August 11, 2026 14:52
@arsenmuk
arsenmuk force-pushed the arsenmuk/az-transient-not-broken-part branch from f9d6177 to 88ea678 Compare August 11, 2026 16:31
@arsenmuk
arsenmuk force-pushed the arsenmuk/az-batch-delete-log branch from a0f1ed4 to ddd5f3f Compare August 11, 2026 16:31
Base automatically changed from arsenmuk/az-transient-not-broken-part to master August 12, 2026 17:18
@arsenmuk
arsenmuk force-pushed the arsenmuk/az-batch-delete-log branch from ddd5f3f to d092ad1 Compare August 12, 2026 18:01
@clickhouse-gh

clickhouse-gh Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 738da31fa with master 3e0c02b3a (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes
Binary Master PR Δ
programs/clickhouse-stripped 692.30 MiB 689.29 MiB -3.01 MiB (-0.43%)

Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction.

Compile time of recompiled translation units

8 translation units recompiled, 20 s compile time in total, 8 of them have a recent master baseline.

Job report

@SmitaRKulkarni SmitaRKulkarni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@arsenmuk
arsenmuk added this pull request to the merge queue Aug 18, 2026
Merged via the queue into master with commit 79d8c66 Aug 18, 2026
358 of 359 checks passed
@arsenmuk
arsenmuk deleted the arsenmuk/az-batch-delete-log branch August 18, 2026 15:15
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Pull request with bugfix, not backported by default pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants