Repository navigation
Conversation
`MergeTreeIndexFactory::get` per part in `clearCaches` made `DETACH` slow: `textIndexCreator` builds `ActionsDAG`. Replace with `MergeTreeIndexFactory::getStreamNames` over per-type format detectors. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Workflow [PR], commit [448559d] Summary: ❌
AI ReviewSummaryThis PR refactors secondary-index mark-cache prewarm and eviction to resolve on-disk stream names without constructing index objects, which removes the expensive Final Verdict✅ No blocking or major issues found in the current diff. |
|
📊 Cloud Performance Report ✅ AI verdict: Both flagged queries (clickbench Q4 at -17.7%, Q15 at -19.3%) look like improvements but were correctly held as no_change: each median lands inside master's current variance band. This PR refactors how on-disk stream names for secondary skip indexes are resolved during index mark-cache load and cleanup, avoiding constructing the index object on those paths. Standard ClickBench Q4/Q15 are plain scan/aggregation queries that don't use secondary indexes, so they can't touch that code, and the ~18-19% deltas are run-to-run variance rather than a real PR effect. No actionable regressions or improvements. clickbench🟢 No significant changes tpch_adapted_1_official🟢 No significant changes Debug info
|
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 61/61 (100.00%) · Uncovered code |
|
Hi, I'm coming from #110049. This PR adds a second path |
But in general, creating index object only to get list of files looks like a useless work |
|
That's right. I'm still curious if the pre/postprocessor evaluation were what really caused the slowness. Anyways, I'm not against merging this PR. |
|
FWIW I've tested it on my dataset it and it helps, DETACH reduced from 22 sec to 7 sec, will take a look separately UPD: looks like this is an overhead for destroying 25K parts |
|
Please re-open if this PR is still useful. |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Resolve secondary index stream names without constructing index objects
MergeTreeIndexFactory::getper part inclearCachesmadeDETACHslow:textIndexCreatorbuildsActionsDAG. Replace withMergeTreeIndexFactory::getStreamNamesover per-type format detectors.On a table with 25K parts and 7 text indexes it can take extra 20 seconds for DETACH - https://pastila.nl/?003e831c/3bbbdcde32385f1838c52be3e3e48a5b#Kz4Twr1lr+vKqpODx9u+XA==GCM