Repository navigation
Wait for the table to load before arming the failpoint in test 05292_part_log_remove_part_on_retried_drop_table - #129699
Conversation
…log_remove_part_on_retried_drop_table Since ClickHouse#116042 clickhouse-local loads persisted tables asynchronously, and a query waits only for the tables it uses. The second clickhouse-local of the test arms the ONCE failpoint disk_object_storage_fail_commit_metadata_transaction as its first statement, which does not use d.t. When the background job 'load table d.t' runs after the arm, the attach commits a metadata transaction on the local_blob_storage disk (DiskObjectStorage::createDirectories), consumes the failpoint and fails with FAULT_INJECTED; DROP TABLE d.t SYNC then waits on the failed load and throws ASYNC_LOAD_WAIT_FAILED (seen twice in Stateless tests (arm_binary, parallel), PRs 125006 and 129676). SYSTEM WAIT LOADING PARTS d.t resolves the table through DatabaseCatalog::getTable -> waitTableStarted, which waits for the load and startup jobs, so the DROP's part removal is again the first metadata commit after the arm. It prints nothing; the reference is unchanged. Validation on a master debug binary: with 3000 filler tables and tables_loader_background_pool_size = 1 the old test fails 9/10 (load still PENDING at the arm in every failing run), the fixed one passes 10/10; tests/clickhouse-test with random settings: 16/50 fail before, 50/50 and 300/300 pass after. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review: my own cold review plus an independent model (engine: codex); 0 findings from either. I traced the added statement: Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20261106-084600 |
|
Workflow [PR], commit [33d32b9] Summary: ✅ AI ReviewSummaryThis test-only change waits for Final VerdictStatus: ✅ Approve. |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-4:20261106-083100 |
|
cc @murphy-4o, could you review this? Since #116042 |
0c67c32
Related: #116042
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
The test
05292_part_log_remove_part_on_retried_drop_tablenow waits for its table to finish loading before it arms the failpoint, so the table load can no longer consume it.Description
The test failed twice in
Stateless tests (arm_binary, parallel)(1, 2) withLoad job 'load table d.t' failed: ... disk_object_storage_fail_commit_metadata_transaction ... (FAULT_INJECTED),. (ASYNC_LOAD_WAIT_FAILED). Both failures came after #116042; there were 0 failures in 116k runs before it.Since #116042,
clickhouse-localloads persisted tables in the background, and a query waits only for the tables it uses. The secondclickhouse-localof the test arms theONCEfailpoint as its first statement, which does not used.t. Whenload table d.truns after that, attaching the table commits a metadata transaction on thelocal_blob_storagedisk (DiskObjectStorage::createDirectories). That consumes the failpoint, the load fails, andDROP TABLE d.t SYNCthrowsASYNC_LOAD_WAIT_FAILED.The fix adds
SYSTEM WAIT LOADING PARTS d.tbefore arming the failpoint. It waits for the table's load and startup jobs and prints nothing, so the.referenceis unchanged. The DROP's part removal is again the first metadata commit after the arm.Validation, master debug binary:
tables_loader_background_pool_size = 1): the current test fails 9/10 with the CI error, and every failing run sawload table d.tstillPENDINGwhen the failpoint was armed. With the fix: 10/10 pass.tests/clickhouse-test, randomized: 50/50 and 300/300 (-j 32) pass with the fix, and 16/50 fail without it.Workflow [PR]
Sync PR [sync-upstream/pr/129699]
Version info
26.11.1.1511-master(included in26.11and later)