Repository navigation
Conversation
ClickHouse#118699 replaces a loaded `StorageTableProxy` with the loaded storage only when nobody else holds the proxy (`replaceUnusedTableInUUIDMapping` requires `use_count() == 2`); otherwise the next lookup tries again. The proxy does not forward `totalBytesUncompressed`, so `total_bytes_uncompressed IS NOT NULL` was a witness that the replacement had already happened. A concurrent catalog-wide `system.columns` scan holds a `StoragePtr` to every table for its whole lifetime, so when one covers the lookups after the load (00941 and 00938 on master f538dd0 / c19b253) the replacement is deferred and the column is NULL. Every other line passes either way. Remove the assertion; 05616_lazy_load_tables_replace_proxy_held checks the replacement with a wait. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 0 findings) plus my own cold review of the same head (0 blocker, 0 major).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20261113-081800 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-7:20261113-075500 |
|
Workflow [PR], commit [9ec8506] Summary: ✅ AI ReviewSummaryReviewed #131220 at Final Verdict✅ Approve. No actionable findings; no inline comments posted. |
73d8c69
Related: #118699
Related: #131099
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not required.
Description
05137_lazy_load_tables_replace_proxy_after_loadfails in parallel jobs withtotal_bytes_uncompressed0instead of1(master: amd_debug, amd_tsan; 12 of ~3800 runs since #118699 merged, always this one diff).#118699 replaces a loaded
StorageTableProxywith the table only if nobody else holds the proxy (DatabaseCatalog::replaceUnusedTableInUUIDMappingneedsuse_count() == 2), and retries on the next lookup otherwise. The proxy does not forwardtotalBytesUncompressed, so this line asserts that the replacement has already happened. A concurrentsystem.columnsscan holds every table until it finishes (00941_system_columns_race_conditionand00938_fix_rwlock_segfault_longwere running in the two master failures), so the replacement is deferred and the proxy answers NULL.This PR removes that one assertion. No other line of the test depends on the replacement, and
05616_lazy_load_tables_replace_proxy_heldalready checks the replacement itself, waiting for the holders to go away. Reverting #118699 would also stop the failure, but the server behaves as that PR documents; only this assertion assumed otherwise.Validation (debug build, 8 concurrent
system.columnsloops like00941): the old test fails 13/50 with exactly this diff, the new one passes 50/50; without the load 50/50, and 50/50 with-j 8.Workflow [PR]
Sync PR [sync-upstream/pr/131220]
Version info
26.11.1.2189-master(included in26.11and later)