Repository navigation
Remove the stale TODO about unloading tables in reverse topological order - #114917
Conversation
…rder `DatabaseCatalog::checkTableCanBeRemovedOrRenamedUnlocked` skips dependent tables from the same database when the removal comes from `DROP DATABASE`, and carried a TODO asking for tables to be unloaded in reverse topological order instead. That ordering exists since #97057: `InterpreterDropQuery::executeToDatabaseImpl` sorts the tables of a `DROP DATABASE` in reverse loading dependency order, so a dependent is always dropped before the table it depends on. The skip here is still required - the dependency graph is consulted per table while the database is being emptied - so only the obsolete TODO is replaced by a pointer to the code that maintains the invariant. Related: #87369 Related: #102506 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Workflow [PR], commit [1298e80] Summary: ✅
AI ReviewSummaryThis PR replaces a stale TODO in Final Verdict✅ No new findings. LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 2/3 (66.67%) · Uncovered code |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction. Compile time of recompiled translation units7 translation units recompiled, 19 s compile time in total, 7 of them have a recent master baseline. |
`InterpreterDropQuery::executeToDatabaseImpl` sorted the tables of a database being dropped in reverse topological order of loading dependencies only (see ClickHouse#97057). Now referential dependencies are taken into account as well, so a dependent is always dropped before the tables it depends on, and if the server crashes mid-drop, the remaining tables keep their dependencies intact. Implements the TODO from ClickHouse#114917 Co-Authored-By: Claude Fable 5 <[email protected]>
DatabaseCatalog::checkTableCanBeRemovedOrRenamedUnlockedskips dependent tables from the same database when the removal comes fromDROP DATABASE, and carried a TODO asking for the tables to be unloaded in reverse topological order instead.That ordering exists since #97057:
InterpreterDropQuery::executeToDatabaseImplsorts the tables of aDROP DATABASEin reverse loading dependency order, so a dependent is always dropped before the table it depends on. The skip itself is still required, since the dependency graph is consulted per table while the database is being emptied, so only the obsolete TODO is replaced by a pointer to the code that maintains the invariant.Comment-only change.
Related: #87369
Related: #102506
Changelog category (leave one):
Version info
26.8.1.1460(included in26.8and later)