Repository navigation
Fix inner table drop hang - #114302
Fix inner table drop hang#114302vitlibar wants to merge 2 commits into
Conversation
|
Workflow [PR], commit [ad77581] AI ReviewSummaryThis PR makes Final Verdict✅ No new blocking issues found. |
The inner-table drop context is a copy of the global context and had no process list element, so KILL QUERY could not interrupt the synchronous wait for the inner table of a materialized view (or window view, or TimeSeries table) to be finally dropped while another query still held a reference to it.
…guard The synchronous wait for the inner tables of a materialized view (or a window view, a TimeSeries table, a MaterializedPostgreSQL table) to be finally dropped used to run under the DDL guard of the table's name. A query holding references to the inner tables and blocking on that DDL guard would deadlock with the waiting DROP. Now the inner drops do not wait (a new skip_sync_wait flag of executeDropQuery), their ids are collected via a new virtual IStorage::getInnerTableIds, and the DROP waits for them after the DDL guard is released.
238948a to
ad77581
Compare
ColumnArray::insertManyDefaults and ColumnString::insertManyDefaults
#113577
|
Interesting, are you sure that it will help with stress hungs? https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=114143&sha=c57b5d86a48a852c094213e4b284beb727cf1aa1&name_0=PR&name_1=Stress%20test%20%28amd_tsan%29 AFAICS it will simply allow to cancel the DROP and do not wait for it, but the table will still be in the dropping queue And AFAIU the fix for this is #113397 Am I missing something? |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix inner table drop hang
Fixed DROP TABLE ... SYNC of a materialized view (and other tables with inner tables, like TimeSeries and window views) hanging unkillably and blocking all DDL on the same table name while another query holds a reference to an inner table: the wait for the inner tables is now interruptible by KILL QUERY and no longer holds the DDL guard.