Repository navigation
SYSTEM SYNC MERGES: report TIMEOUT_EXCEEDED when CancellationChecker stops it - #127759
Merged
Merged
Conversation
…cker` stops it `CancellationChecker` measures `max_execution_time` from the registration of the query in the process list, which is earlier than the `start` of the polling loop in `InterpreterSystemQuery::syncMerges`. When the checker fires first, the loop saw only `isQueryCanceled` and threw `QUERY_WAS_CANCELLED`, although the cancel reason is the timeout. Check `QueryStatus::throwIfKilled` instead, which throws `TIMEOUT_EXCEEDED` for a timeout cancellation. This made `05317_sync_merges_waits_for_commit` fail in the flaky check of #71028: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=71028&sha=8756552a877bdecfeaed1cce864ace0a31b8288a&name_0=PR&name_1=Stateless%20tests%20%28amd_debug%2C%20flaky%20check%29 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
Workflow [PR], commit [7015b3a] Summary: ✅
AI ReviewSummary
Final VerdictStatus: ✅ Approve. |
Contributor
Build profile diff (arm_release)Commit See the job log for details. |
1 task done
alexey-milovidov
left a comment
Member
Author
There was a problem hiding this comment.
Looks trivial.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CancellationCheckermeasuresmax_execution_timefrom the registration of the query in the process list. That is earlier than thestartof the polling loop inInterpreterSystemQuery::syncMerges. When the checker fires first, the loop saw onlyisQueryCanceledand threwQUERY_WAS_CANCELLED, even though the cancel reason is the timeout. The loop now callsQueryStatus::throwIfKilled, which throwsTIMEOUT_EXCEEDEDfor a timeout cancellation.This race made
05317_sync_merges_waits_for_commitfail in every flaky check of #71028. The test expectsTIMEOUT_EXCEEDEDfromSYSTEM SYNC MERGESbeforeCOMMIT. In the server log,CancellationChecker: Cancelling the task because of the timeoutis followed byCode: 394 ... QUERY_WAS_CANCELLED: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=71028&sha=8756552a877bdecfeaed1cce864ace0a31b8288a&name_0=PR&name_1=Stateless%20tests%20%28amd_debug%2C%20flaky%20check%29Changelog category (leave one):
Documentation entry for user-facing changes
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/127759]
Version info
26.11.1.800-master(included in26.11and later)