Repository navigation
Make 05315_plain_rewritable_part_removal_without_copies independent of where parts are removed - #123637
Conversation
… of where parts are removed The test asserted that `TRUNCATE` itself removes the truncated parts and checked `DiskS3CopyObject`/`DiskS3DeleteObjects` of that query. Removal at the end of `TRUNCATE` is best-effort: `MergeTreeData::grabOldParts` skips everything when another thread holds `grab_old_parts_mutex` or a part is still referenced elsewhere, and then the parts are removed later by the background cleanup, so the test was flaky in the private CI. Now the test uses a `plain_rewritable` disk of its own, waits until the truncated parts are gone regardless of which thread removed them, and checks the `Copy` and `Delete` events of that disk in `system.blob_storage_log` since `TRUNCATE` started. The events are not tied to a query, so the check holds for the background cleanup as well. Related: ClickHouse/clickhouse-private#79034 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [2e01126] Summary: ✅ AI ReviewSummaryThis PR rewrites Findings
Final Verdict
|
|
🕵 @groeneai, investigate the failure: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=123637&sha=1e6ef2736b394f70d5a38b8b993af187d859215d&name_0=PR&name_1=Stateless%20tests%20%28arm_asan_ubsan%2C%20azure%2C%20parallel%29 ( |
|
This is already fixed by #122453 (mine, merged 2026-10-04 00:08 UTC). The failing run was on 1e6ef27, which does not contain it; your master merge 89e1b87 does.
Since 01:00 UTC today, CIDB has 0 failures of |
|
🕵 @groeneai, thanks, confirmed: the master merge includes #122453, and The only red job on 89e1b87 is Stateless tests (arm_asan_ubsan, azure, sequential). It stopped at the job timeout (9000 s) after test 1153 of 1164, and every test before that passed. |
05315_plain_rewritable_part_removal_without_copiesfails sometimes in the private CI: theTRUNCATEquery has noDiskS3DeleteObjects, so the test decides the parts were not removed.The test needed
TRUNCATEto remove the truncated parts itself, and it read the profile events of that query. But removing the parts at the end ofTRUNCATEis best-effort.MergeTreeData::grabOldPartsskips all of them when another thread holdsgrab_old_parts_mutex, or when a part is still referenced somewhere else. The background cleanup then removes them later, outside the query.With this change the test creates a
plain_rewritabledisk of its own, both plain and wrapped in cache and encryption. It waits until the truncated parts are gone, no matter which thread removed them. Then it checks theCopyandDeleteevents of that disk insystem.blob_storage_logsinceTRUNCATEstarted. These events do not belong to a query, so removal by the background cleanup is covered too. Events beforeTRUNCATEare ignored: inserting a part also unlinks a few files outside parts, andDROP TABLEunlinksformat_version.txt, and both make copies.I checked it locally in the CI Docker environment. On a binary with the fix from #123303 reverted, the test fails with 6 copies per table. With the fix, it passed 100 runs out of 100.
Related: https://github.com/ClickHouse/clickhouse-private/issues/79034
Related: #123303
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/123637]
Version info
26.10.1.1641-master(included in26.10and later)