Repository navigation
Stop overcollecting values for set skip indexes - #104519
Conversation
The latest `Hung check failed, possible deadlock found` report shows a cancelled `INSERT` spending most of its time in `MergeTreeIndexAggregatorSet::update`, with `MergeTreeDataWriterSkipIndicesCalculationMicroseconds` at about 26 minutes. `set(N)` skip-index granules with more than `N` distinct values are serialized as empty, so retaining every subsequent distinct value cannot improve pruning. Stop after retaining the `N + 1`st value; that is enough to preserve the overfull state while bounding CPU and memory for the granule. Add a unit test for the retention bound. CI examples: https://play.clickhouse.com/play?user=play&run=1#U0VMRUNUIGNoZWNrX3N0YXJ0X3RpbWUsIGNoZWNrX25hbWUsIHRlc3RfbmFtZSwgcmVwb3J0X3VybApGUk9NIGNoZWNrcwpXSEVSRSAxCiAgICBBTkQgY2hlY2tfc3RhcnRfdGltZSA+PSBub3coKSAtIElOVEVSVkFMIDI0IEhPVVIKICAgIEFORCAoaGVhZF9yZWYgPSAnbWFzdGVyJyBBTkQgc3RhcnRzV2l0aChoZWFkX3JlcG8sICdDbGlja0hvdXNlLycpKQogICAgQU5EIHRlc3Rfc3RhdHVzICE9ICdTS0lQUEVEJwogICAgQU5EICh0ZXN0X3N0YXR1cyBMSUtFICdGJScgT1IgdGVzdF9zdGF0dXMgTElLRSAnRSUnKQogICAgQU5EIGNoZWNrX3N0YXR1cyAhPSAnc3VjY2VzcycKICAgIEFORCBjaGVja19uYW1lIE5PVCBMSUtFICdsaWJGdXp6ZXIlJwogICAgQU5EIGNoZWNrX25hbWUgIT0gJ0NsaWNrSG91c2UgS2VlcGVyIEplcHNlbicKICAgIEFORCBjaGVja19uYW1lIE5PVCBMSUtFICdJbnRlZ3JhdGlvbiB0ZXN0cyAoYW1kX2xsdm1fY292ZXJhZ2UlJwpPUkRFUiBCWSBjaGVja19zdGFydF90aW1lIERFU0M= CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=1b76e322cbdb89960eea5236f4eda5ad3f9e164d&name_0=MasterCI&name_1=Stress%20test%20%28experimental%2C%20serverfuzz%2C%20azure%2C%20amd_tsan%29&name_1=Stress%20test%20%28experimental%2C%20serverfuzz%2C%20azure%2C%20amd_tsan%29
|
Workflow [PR], commit [9a902609] Summary: ✅ AI ReviewSummaryThis PR bounds Final Verdict
|
|
@groeneai, please investigate the following CI failures — none of them appear related to this PR (which only touches
If fixes for any of these are already in progress, please link them here. |
|
@alexey-milovidov — attribution for the three clusters, all confirmed unrelated to this PR (which only modifies 1. This is the WasmEdge MSan SystemLog-flush family (umbrella #104866 — 14 tracked test patterns, all failing with the same Your revert PR #104971 ("Revert x86 default from x86-64-v3 back to x86-64-v2") merged 2026-05-15 08:57 UTC — i.e. after PR #104519's failing CI runs (2026-05-14/15 morning). CIDB confirms the family was still bleeding right up to the revert merge:
Re-running PR #104519's CI on a post-revert master should clear these four tests. Follow-up tracker is PR #105019 (re-enable v3 after proper fix). No action needed on #104519. 2. Confirmed transient by the auto-rerun (you noted "All reruns passed"). No tracking needed. 3a. This test is CH Inc–private only — it does not exist in the public 3b. The hung-check itself failed to capture traces (the
Totals: ~58 master hits, 1–16 distinct PRs/day. Tracked under chronic umbrella ( Summary: PR #104519's own diff is fine. Clusters 1 + 3b are chronic family hits; cluster 2 is transient; cluster 3a is private-only. Recommend rerunning post-#104971-merge to clear cluster 1 and merging once cluster 3b clears via retry. Session: |
LLVM Coverage Report
Changed lines: 100.00% (24/24) · Uncovered code |
…eadlock Stop overcollecting values for set skip indexes
Fixes a master CI stress failure where a cancelled
INSERTinto a table with an overfullset(N)skip index kept collecting every distinct value inMergeTreeIndexAggregatorSet::update.set(N)granules with more thanNvalues serialize as empty, so this bounds retained values toN + 1.CI examples: https://play.clickhouse.com/play?user=play&run=1#U0VMRUNUIGNoZWNrX3N0YXJ0X3RpbWUsIGNoZWNrX25hbWUsIHRlc3RfbmFtZSwgcmVwb3J0X3VybApGUk9NIGNoZWNrcwpXSEVSRSAxCiAgICBBTkQgY2hlY2tfc3RhcnRfdGltZSA+PSBub3coKSAtIElOVEVSVkFMIDI0IEhPVVIKICAgIEFORCAoaGVhZF9yZWYgPSAnbWFzdGVyJyBBTkQgc3RhcnRzV2l0aChoZWFkX3JlcG8sICdDbGlja0hvdXNlLycpKQogICAgQU5EIHRlc3Rfc3RhdHVzICE9ICdTS0lQUEVEJwogICAgQU5EICh0ZXN0X3N0YXR1cyBMSUtFICdGJScgT1IgdGVzdF9zdGF0dXMgTElLRSAnRSUnKQogICAgQU5EIGNoZWNrX3N0YXR1cyAhPSAnc3VjY2VzcycKICAgIEFORCBjaGVja19uYW1lIE5PVCBMSUtFICdsaWJGdXp6ZXIlJwogICAgQU5EIGNoZWNrX25hbWUgIT0gJ0NsaWNrSG91c2UgS2VlcGVyIEplcHNlbicKICAgIEFORCBjaGVja19uYW1lIE5PVCBMSUtFICdJbnRlZ3JhdGlvbiB0ZXN0cyAoYW1kX2xsdm1fY292ZXJhZ2UlJwpPUkRFUiBCWSBjaGVja19zdGFydF90aW1lIERFU0M=
CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=1b76e322cbdb89960eea5236f4eda5ad3f9e164d&name_0=MasterCI&name_1=Stress%20test%20%28experimental%2C%20serverfuzz%2C%20azure%2C%20amd_tsan%29&name_1=Stress%20test%20%28experimental%2C%20serverfuzz%2C%20azure%2C%20amd_tsan%29
Open issue search: no matching open issue found for
Hung check failed, possible deadlock found.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not applicable.
Documentation entry for user-facing changes
Version info
26.5.1.870