Repository navigation
Throw an exception instead of aborting when an Azure endpoint omits the ETag header - #127673
Conversation
…he `ETag` `Azure::ETag::ToString` aborts the process when the tag is absent, also in release builds. `ETag` is an optional header, so an Azure-compatible endpoint that omits it could take the server down on `GetProperties`, `ListBlobs` or `Download`. Use `AzureBlobStorage::getETag`, which throws `AZURE_BLOB_STORAGE_ERROR` instead. Related: #120908 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [eff22cb] Summary: ✅
AI ReviewSummaryReviewed #127673 at Final VerdictStatus: ✅ Approve |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units43 translation units recompiled, 391 s compile time in total, 43 of them have a recent master baseline. |
|
🕵 CI status: |
|
🕵 @groeneai, investigate the failure: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=127673&sha=11ab59dc253902d40d4223d3f6cc606db687b7c2&name_0=PR&name_1=Stateless%20tests%20%28amd_debug%2C%20parallel%29 and provide a fix in a separate PR. If the fix is already in progress, link it here.
|
|
Acknowledged. I'm investigating why |
|
The fix is in #128036. Without a local plan, the coordinator reported the total through one stored progress callback that every |
|
🕵 Thanks @groeneai — the |
|
🕵 Merged the latest |
The fake endpoint serves a blob without the optional `ETag` header. Without the fix, `ReadBufferFromAzureBlobStorage::setMetadataFromResponse` calls `Azure::ETag::ToString` and the process aborts; with the fix the read fails with `AZURE_BLOB_STORAGE_ERROR`. The PR had no test, so the "new tests" check of the `Bug Fix` category failed: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=127673&sha=64f94366e19e65e4544170a9981ba07f2a6f5505&name_0=PR&name_1=Finish%20Workflow PR: #127673 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🕵 Added |
|
🕵 Merged the latest |
Master merged #127673, a minimal alternative to this PR: `AzureBlobStorage::getETag` throws `AZURE_BLOB_STORAGE_ERROR` when the endpoint omits the `ETag`. This PR instead reports an absent tag as an empty string (`AzureBlobStorage::getETagOrEmpty`) and hardens the consumers that rely on it, so the conflicts at the four call sites are resolved in favor of this PR. `getETag` has no callers left and is removed, together with `gtest_azure_read_buffer_missing_etag.cpp`, which pinned the exception; `gtest_azure_object_storage_metadata.cpp` covers the same download paths (sequential read and `readBigAt`) with the new behavior. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… an Azure endpoint omits the `ETag` header
… an Azure endpoint omits the `ETag` header
…n an Azure endpoint omits the `ETag` header
Backport #127673 to 26.8: Throw an exception instead of aborting when an Azure endpoint omits the `ETag` header
Backport #127673 to 26.10: Throw an exception instead of aborting when an Azure endpoint omits the `ETag` header
Backport #127673 to 26.3: Throw an exception instead of aborting when an Azure endpoint omits the `ETag` header
… an Azure endpoint omits the `ETag` header
… an Azure endpoint omits the `ETag` header
…n an Azure endpoint omits the `ETag` header
ETagis an optional response header, andAzure::ETag::ToStringaborts the process when the tag is absent (in release builds too, becauseAZURE_ASSERT_MSGexpands tostd::abortunderNDEBUG). Four call sites converted it unconditionally:ReadBufferFromAzureBlobStorage::setMetadataFromResponse(on everyDownload),AzureObjectStorage::getObjectMetadata(GetProperties), and both listing paths (listObjectsandAzureIteratorAsync). An Azure-compatible endpoint that omits the header could abort the server.This is a minimal alternative to #120908: instead of substituting an empty
ETag(which then required hardening the Icebergversion-hint.textcompare-and-swap and theObjectStorageQueuededuplication), the newAzureBlobStorage::getETagthrowsAZURE_BLOB_STORAGE_ERROR, so the query fails with an exception and the server keeps running.Related: #120908
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Throw an exception instead of aborting the server when an Azure Blob Storage endpoint omits the optional
ETagheader in a response to blob download,GetProperties, or listing.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/127673]
Version info
26.11.1.1090-master(included in26.11and later)