Don't handle `timeout_overflow_mode='break'` in `ReplicatedMergeTreeSink::waitForQuorum` by nickitat · Pull Request #107760 · ClickHouse/ClickHouse · GitHub
Skip to content

Don't handle timeout_overflow_mode='break' in ReplicatedMergeTreeSink::waitForQuorum#107760

Merged
nickitat merged 1 commit into
masterfrom
fix_quorum_wait
Jun 18, 2026
Merged

Don't handle timeout_overflow_mode='break' in ReplicatedMergeTreeSink::waitForQuorum#107760
nickitat merged 1 commit into
masterfrom
fix_quorum_wait

Conversation

@nickitat

@nickitat nickitat commented Jun 17, 2026

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

#107513 caused failures in CI, and we decided to reconsider the behaviour with timeout_overflow_mode='break'.

Version info

  • Merged into: 26.6.1.976

@clickhouse-gh

clickhouse-gh Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jun 17, 2026
INSERT INTO quorum_break_r1
SETTINGS insert_quorum = 2, insert_quorum_parallel = 0, insert_quorum_timeout = 6000000, max_execution_time = 3, timeout_overflow_mode = 'break', async_insert = 0, insert_keeper_fault_injection_probability = 0
VALUES (1); -- { serverError TIMEOUT_EXCEEDED }
SETTINGS insert_quorum = 2, insert_quorum_parallel = 0, insert_quorum_timeout = 3000, max_execution_time = 300, timeout_overflow_mode = 'break', async_insert = 0, insert_keeper_fault_injection_probability = 0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This setting means the break case never exercises the behavior this PR changes. insert_quorum_timeout = 3000 bounds the wait at about 3 seconds, while max_execution_time = 300 leaves checkTimeLimit returning true for the whole wait, so this test would still pass if the new waitForQuorum call ignored no false return at all.

Please add focused coverage where max_execution_time expires while the query is already waiting for quorum and insert_quorum_timeout is still in the future, then assert that the query continues to the quorum timeout and reports UNKNOWN_STATUS_OF_INSERT. A small shell test like 04338_kill_quorum_insert can make this deterministic by starting the quorum INSERT, waiting until it is blocked in the quorum wait, and only then observing the result.

@nickitat nickitat marked this pull request as ready for review June 17, 2026 17:00
@clickhouse-gh

clickhouse-gh Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 85.20% 85.20% +0.00%
Functions 92.30% 92.30% +0.00%
Branches 77.50% 77.50% +0.00%

Changed lines: Changed C/C++ lines covered by tests: 7/7 (100.00%) | Lost baseline coverage (was covered on master, now uncovered in this PR): 8 line(s) · Uncovered code

Full report · Diff report

@nickitat nickitat enabled auto-merge June 18, 2026 10:44
@nickitat nickitat added this pull request to the merge queue Jun 18, 2026
Merged via the queue into master with commit e6da78a Jun 18, 2026
546 of 648 checks passed
@nickitat nickitat deleted the fix_quorum_wait branch June 18, 2026 11:23
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants