Fix infinite loop in AzureObjectStorage::listObjects#90947
Merged
kssenii merged 2 commits intoClickHouse:masterfrom Nov 27, 2025
Merged
Fix infinite loop in AzureObjectStorage::listObjects#90947kssenii merged 2 commits intoClickHouse:masterfrom
kssenii merged 2 commits intoClickHouse:masterfrom
Conversation
Contributor
|
Workflow [PR], commit [a4957d0] Summary: ❌
|
kssenii
approved these changes
Nov 27, 2025
| if (client_ptr->IsClientForDisk()) | ||
| ProfileEvents::increment(ProfileEvents::DiskAzureListObjects); | ||
|
|
||
| blob_list_response = client_ptr->ListBlobs(options); |
Member
There was a problem hiding this comment.
To be honest I do not understand how it worked before at all, it looks like because of this blob_list_response override inside the loop we always listed only the first page and never went to the next one?
alesapin
approved these changes
Nov 27, 2025
Merged
via the queue into
ClickHouse:master
with commit Nov 27, 2025
5372318
119 of 130 checks passed
This was referenced Nov 27, 2025
jkartseva
added a commit
that referenced
this pull request
Nov 28, 2025
Cherry pick #90947 to 25.8: Fix infinite loop in AzureObjectStorage::listObjects
jkartseva
added a commit
that referenced
this pull request
Nov 28, 2025
Cherry pick #90947 to 25.10: Fix infinite loop in AzureObjectStorage::listObjects
jkartseva
added a commit
that referenced
this pull request
Nov 28, 2025
Cherry pick #90947 to 25.11: Fix infinite loop in AzureObjectStorage::listObjects
robot-clickhouse
added a commit
that referenced
this pull request
Nov 28, 2025
robot-ch-test-poll1
added a commit
that referenced
this pull request
Nov 28, 2025
Cherry pick #90947 to 25.9: Fix infinite loop in AzureObjectStorage::listObjects
robot-clickhouse
added a commit
that referenced
this pull request
Nov 28, 2025
robot-clickhouse
added a commit
that referenced
this pull request
Nov 28, 2025
robot-clickhouse
added a commit
that referenced
this pull request
Nov 28, 2025
jkartseva
added a commit
that referenced
this pull request
Dec 1, 2025
Backport #90947 to 25.8: Fix infinite loop in AzureObjectStorage::listObjects
jkartseva
added a commit
that referenced
this pull request
Dec 1, 2025
Backport #90947 to 25.9: Fix infinite loop in AzureObjectStorage::listObjects
jkartseva
added a commit
that referenced
this pull request
Dec 1, 2025
Backport #90947 to 25.10: Fix infinite loop in AzureObjectStorage::listObjects
jkartseva
added a commit
that referenced
this pull request
Dec 1, 2025
Backport #90947 to 25.11: Fix infinite loop in AzureObjectStorage::listObjects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The loop calls
client_ptr->ListBlobs(options)inside the body on every iteration, overwritingblob_list_responsewith the first page.This cancels out the pagination logic (
MoveToNextPage()) in the loop. If the first page returnsHasPage()==true, for example, when the first page is empty, this leads to an infinite loop:https://pastila.clickhouse.com/?00079d20/bac6ffc01386edeba163db1798cf2832#zb4gt9R5wmh4zOzbk3PbeA==
Azurite does not reproduce this.
I’ve tried to reproduce the bug using gtest mocks (e.g., for the AzureBlobStorage::ContainerClient), but haven’t succeeded yet.
For reference, the SDK demonstrates blob iteration as follows:
https://github.com/ClickHouse/azure-sdk-for-cpp/blob/0f7a2013f7d79058047fc4bd35e94d20578c0d2b/sdk/storage/azure-storage-blobs/test/ut/blob_container_client_test.cpp#L299-L306
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix possible infinite loop in azure list blobs.
Documentation entry for user-facing changes