-
Notifications
You must be signed in to change notification settings - Fork 8.7k
Allowlist rdb_test_ DDLWorker UUID-collision upgrade-check restart noise #107126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
groeneai
wants to merge
1
commit into
ClickHouse:master
Choose a base branch
from
groeneai:groeneai/upgrade-check-allowlist-rdb-uuid-collision
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DatabaseReplicatedDDLWorker::initializeMainThreadlogs this exactError on initialization of ...line for every failed recovery attempt and then just waits 5s and retries. In this job we only prove that the server process starts and answers a trivial query; we never touch the leftoverrdb_test_*databases again, andclickhouse-test --upgrade-checkruns with--fake-drop, so those replicated databases are intentionally left behind for the post-upgrade phase.That means this new
grep -avno longer only suppresses transient noise: it also hides a realrecoverLostReplicaregression if anrdb_test_*database gets stuck in the same UUID-collision retry loop after upgrade. As long as the server answersSELECT 1, the upgrade check will now pass with no remaining signal that replicated-database recovery is broken. We need an extra post-restart assertion that therdb_test_*databases actually finish recovery before masking this line.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified against source. Your two facts check out:
Error on initialization of {db}is emitted at one site,src/Databases/DatabaseReplicatedWorker.cpp:131, in thewhile (!stop_flag)catch that waits 5s and retries, sogrep -avdrops every occurrence, not just transient ones.rdb_test_*DBs are intentionally left by--fake-drop(tests/clickhouse-test:6736) and hitinitializeReplication->recoverLostReplicaon restart.The problem with a post-restart assertion is timing:
upgrade_runner.shstops the server at line 322 and only scrubsclickhouse-server.upgrade.logat line 454, so there is no live server left to querysystem.databases. The only remaining signal is log-string correlation (requireFinishing replica initialization, line 264, for every erroredrdb_test_DB). That is racy: recovery retries on a 5s cadence andstop_servercan land between an error and the next successful attempt on a fully benign run, which would fail the upgrade check for every PR. A new cross-PR flake in shared CI is worse than one masked benign line.Residual risk acknowledged: after
max_retries_before_automatic_recovery(default 10,DatabaseReplicatedSettings.cpp:23) the loop force-resets the digest and re-recovers from the ZK snapshot; a regression that still fails past that point would keep this line masked. I am weighing that against the flake cost above, and against the 4-token regex still surfacing aLOGICAL_ERRORUUID crash, the same collision on a non-rdb_test_DB, a different init failure on anrdb_test_DB, or an unrelatedTABLE_ALREADY_EXISTS. This matches the merged precedent for benign scrub noise (#106616, #106516).Keeping the line-level allowlist. If a maintainer prefers a stricter guard, a count threshold (fail if the collision repeats more than K times) is the least-fragile option, but the flake-vs-signal call is theirs.