Repository navigation
Revert "Resolve the query status per call in functions that check for cancellation" - #114537
PedroTadim wants to merge 1 commit into
Conversation
|
Workflow [PR], commit [86236da] Summary: ❌
AI ReviewSummaryThis PR reverts the execution-time Missing context / blind spots
Findings❌ Blockers Final VerdictStatus: ❌ Block LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 61/65 (93.85%) · Uncovered code |
| if (max_input_size != 0) | ||
| max_input_size = context->getSettingsRef()[Setting::function_base58_max_input_size]; | ||
| return std::make_shared<FunctionBaseXXConversion>(max_input_size); | ||
| return std::make_shared<FunctionBaseXXConversion>(context->getProcessListElementSafe(), max_input_size); |
There was a problem hiding this comment.
Capturing QueryStatusPtr here reopens the persisted-expression bug that #113456 fixed, and the same problem applies to the other five constructor changes in this revert. KeyDescription::getKeyFromAST stores built functions inside partition_key.expression (src/Storages/KeyDescription.cpp:175-180, src/Storages/MergeTree/registerStorageMergeTree.cpp:686), so later INSERTs execute them with the finished CREATE TABLE query's status; the sorting-key / skip-index path rebuilds from MergeTreeData::getContext() (src/Storages/MergeTree/MergeTreeData.cpp:744, 1417-1431, 1476-1478), which is the global context and therefore has no process-list element at all. In both routes the in-loop cancellation checks become stale or dead again, so persisted expressions can ignore max_execution_time and KILL QUERY, and the PARTITION BY route also keeps the old query status alive via a strong reference. This still needs an execution-time lookup (for example via CurrentThread / makeCancellationCheck) rather than restoring query state as member data.
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 units23 translation units recompiled, 115 s compile time in total, 23 of them have a recent master baseline. |
|
Let's decide on this first |
Reverts #113456
Needs a better solution