Repository navigation
Fix flaky test test_temporary_lock_quota_is_retained_across_rounds - #126965
Algunenano merged 1 commit into
Conversation
The test from ClickHouse#121478 fails in `Integration tests (arm_binary, 2/4)` with "No consumer kept a non-zero temporary-lock quota for 4 consecutive rounds" (6 failures on 5 unrelated PRs, none on master or amd). The four `kafka_tmp_r*` tables share one server and one schedule, so their slow-path rounds fire together. Each round releases its temporary locks before `get_metadata`, which takes 150-560 ms on that runner, so every round re-contests the three leftover partitions: the first reader grows its quota to 2, the second takes 1, the others drop to 0, and each quota cycles 1, 2, 0. `lockTemporaryLocksLocked` behaves as specified (all leftovers are taken in every round); only the threshold of 4 assumed non-overlapping rounds. Lower the threshold to 2. The old inverted shrink condition reset a quota of 1 to 0 in the next round, so it can never produce two consecutive non-zero quotas, and the test still separates the two behaviours. All six recorded CI failures already contain a run of 2. Locally 10 separate runs pass, and with the old condition restored in `KeeperHandlingConsumer.cpp` 3 of 3 runs fail with every quota alternating 1, 0. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 0 findings) plus my own cold review (3 nits).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-9:20261020-142000 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-40:20261020-123800 |
|
cc @kssenii, could you review this and add the |
|
Workflow [PR], commit [214b097] Summary: ✅ AI ReviewSummaryThe PR lowers Final VerdictStatus: ✅ Approve |
81ae09f
Related: #121478
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not required (CI fix).
Description
test_storage_kafka/test_multi_consumer_quota.py::test_temporary_lock_quota_is_retained_across_rounds, added in #121478, fails inIntegration tests (arm_binary, 2/4)withNo consumer kept a non-zero temporary-lock quota for 4 consecutive rounds. It failed 7 times, never on amd: 6 times on 5 unrelated PRs and once on master inIntegration tests (arm_binary, distributed plan, 2/4)(master, #125968, #118942, #126772).The four
kafka_tmp_r*tables run on one server, start consuming in the same query and use the same settings, so their slow-path rounds fire together. Each round releases its temporary locks beforeget_metadata, which takes 150-560 ms on that runner, so every round re-contests the three leftover partitions. The first reader grows its quota to 2, the second takes 1, the rest drop to 0, and each quota cycles 1, 2, 0. All three leftovers are still taken in every round, solockTemporaryLocksLockedworks as intended. Only the threshold of 4 assumes that rounds do not overlap.The threshold is lowered to 2. The old inverted shrink condition reset a quota of 1 to 0 in the next round, so it can never produce two consecutive non-zero quotas, and the test still separates the two behaviours. All seven recorded failures already contain a run of 2.
Validation: 10 separate runs pass, each in its second round. With the old shrink condition restored in
KeeperHandlingConsumer.cpp, 3 of 3 runs fail, with every quota alternating 1, 0.Workflow [PR]
Sync PR [sync-upstream/pr/126965]
Version info
26.11.1.493-master(included in26.11and later)