Repository navigation
Fix flaky test test_azure_glob_scheherazade - #107799
alexey-milovidov merged 1 commit into
Conversation
Pre-PR validation gate
Session id: cron:clickhouse-worker-slot-0:20260617-213700 |
|
cc @SmitaRKulkarni — could you review this? It fixes the flaky timeout in test_azure_glob_scheherazade by parallelizing the cleanup that drops 1001 AzureBlobStorage tables (previously serial, exceeding the 900s timeout under sanitizers), using the same chunked-thread pattern the test already uses for creation. |
|
Workflow [PR], commit [3f8a066] Summary: ✅ AI ReviewSummaryThis PR changes cleanup in Final VerdictStatus: ✅ Approve |
The test creates 1001 AzureBlobStorage tables across ~31 threads, then dropped all of them serially during cleanup. Under sanitizer builds with concurrent xdist workers the serial cleanup (1001 sequential DROP TABLE round-trips, each able to hit azure_query's retry backoff) exceeded the 900s pytest-timeout. Parallelize the cleanup using the same chunked-thread pattern already used for table creation. The creation phase already runs ~31 concurrent threads doing heavier CREATE plus INSERT work without timing out, so the lighter parallel DROP is well within the established concurrency the test exercises. Test intent is unchanged: still 1001 tables, still verifies glob selection beyond the 1000-blob pagination boundary. Use helpers.utility.SafeThread for the DROP workers so a cleanup exception that survives azure_query's retries is re-raised on join(), instead of a raw threading.Thread silently swallowing it and leaving the table behind. Co-Authored-By: Claude Opus 4.8 <[email protected]>
e516fc2 to
3f8a066
Compare
Pre-PR validation gate (fixup 3f8a066, addressing bot CR)
Session id: cron:clickhouse-worker-slot-4:20260617-234300 |
LLVM Coverage Report
Changed lines: No C/C++ source files changed — skipping uncovered code analysis. Newly covered by added/modified tests: 456 line(s), 46 function(s) across 124 file(s) · Details Top files
|
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Fixes the flaky integration test
test_storage_azure_blob_storage/test.py::test_azure_glob_scheherazade, which times out (>900s pytest-timeout) under sanitizer builds with concurrent xdist workers.The test creates 1001 AzureBlobStorage tables across ~31 threads to verify glob selection beyond the 1000-blob pagination boundary, then dropped all 1001 tables serially during cleanup. The serial cleanup is 1001 sequential
DROP TABLEround-trips, each of which can enterazure_query's retriable-error backoff (time.sleep(i), up to 10 tries). Under ASan plus contention from concurrent workers the cleanup wall-clock crossed the per-test timeout.The fix parallelizes the cleanup using the same chunked-thread pattern the test already uses for creation. The creation phase runs ~31 concurrent threads doing heavier CREATE + INSERT work without timing out, so the lighter parallel DROP stays well within the concurrency the test already exercises. Test intent is unchanged: still 1001 tables, still asserts the glob count beyond the 1000-blob boundary.
Surfaced on PR #101143 ("Integration tests (amd_asan_ubsan, db disk, old analyzer, 6/6)"), whose clickhouse-local SYSTEM LISTEN changes do not touch AzureBlobStorage code. Pre-existing chronic flake, fixed here in a separate PR.
Version info
26.6.1.965