Repository navigation
Fix data race in FutureSetFromTuple - #104673
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Workflow [PR], commit [3560975] Summary: ❌
AI ReviewSummaryThis PR replaces ad-hoc Tests
Final Verdict
|
| FutureSet::Hash FutureSetFromTuple::getHash() const { return hash; } | ||
|
|
||
| Columns FutureSetFromTuple::getKeyColumns() | ||
| void FutureSetFromTuple::fillSetElementsOnce() |
There was a problem hiding this comment.
This looks like the right synchronization direction, but we still need proof that the race is fixed.
Please add a focused regression test that exercises concurrent access to the same FutureSetFromTuple from both buildOrderedSetInplace and getKeyColumns and verifies we do not hit LOGICAL_ERROR (and ideally stays clean under TSAN).
Without that, the Critical Bug Fix contract is not verifiable.
There was a problem hiding this comment.
I don't think it's possible to cover that race with a test
There was a problem hiding this comment.
Thanks for the update. I agree deterministic reproduction of this race is hard, but we still need evidence for the Critical Bug Fix contract.
Please add a focused regression/stress test that drives concurrent calls to FutureSetFromTuple::buildOrderedSetInplace and FutureSetFromTuple::getKeyColumns on the same object (ideally under TSAN), or provide before/after TSAN evidence from this reproducer. Without that, we cannot verify the race is actually fixed rather than just made less likely.
|
The |
LLVM Coverage Report
Changed lines: 100.00% (15/15) · Uncovered code |
Cherry pick #104673 to 25.8: Fix data race in FutureSetFromTuple
Cherry pick #104673 to 26.2: Fix data race in FutureSetFromTuple
Cherry pick #104673 to 26.3: Fix data race in FutureSetFromTuple
Cherry pick #104673 to 26.4: Fix data race in FutureSetFromTuple
Backport #104673 to 26.2: Fix data race in FutureSetFromTuple
Backport #104673 to 26.3: Fix data race in FutureSetFromTuple
Backport #104673 to 26.4: Fix data race in FutureSetFromTuple
Backport #104673 to 25.8: Fix data race in FutureSetFromTuple
|
Backport labels have been automatically added based on https://github.com/ClickHouse/clickhouse-core-incidents/issues/1138 Labels added:
These labels ensure backport PRs are properly created for each affected release version. The release automation will create backport PRs as needed based on these labels. |
…4673 Backport ClickHouse#104673 to 26.4: Fix data race in FutureSetFromTuple
Linked issues
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix a TOCTOU data race in
FutureSetFromTuple::buildOrderedSetInplacethat results in a logical error.Documentation entry for user-facing changes
Version info
26.5.1.65026.4.3.21,26.3.11.21,26.2.19.29,25.8.24.16