Fix flaky test_short_disconnection backup/restore tests#96838
Merged
alexey-milovidov merged 1 commit intomasterfrom Feb 14, 2026
Merged
Fix flaky test_short_disconnection backup/restore tests#96838alexey-milovidov merged 1 commit intomasterfrom
alexey-milovidov merged 1 commit intomasterfrom
Conversation
…rt_disconnection_doesnt_stop_restore` When `faster_zk_disconnect_detect.xml` is randomly chosen (which sets `session_timeout_ms=5000`), the ZK connection drop via iptables must be short enough to avoid session expiry. Previously, the drop duration was up to 3-4 seconds via `random_sleep`. Combined with the time since the last heartbeat (~1.7s for a 5s session timeout) and reconnection overhead, the total silence could exceed 5 seconds, causing the ZK session to expire and the backup/restore to fail regardless of the 30-second `failure_after_host_disconnected_for_seconds` threshold. The fix limits the drop duration to 1 second when using the faster ZK disconnect detection config, while keeping the original duration when using default ZK settings. CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=96758&sha=d29b41fbe684f8c90ace4fd71828ce0d4ac8b88f&name_0=PR&name_1=Integration%20tests%20%28arm_binary%2C%20distributed%20plan%2C%204%2F4%29 Closes: #80359 Co-Authored-By: Claude Sonnet 4.5 (1M context) <[email protected]>
Contributor
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.
Summary
test_short_disconnection_doesnt_stop_backupandtest_short_disconnection_doesnt_stop_restoreby limiting ZK connection drop duration whenfaster_zk_disconnect_detect.xmlis usedsession_timeout_ms=5000), the iptables drop lasting up to 3-4 seconds can cause ZK session expiry due to total heartbeat silence exceeding 5 seconds (drop duration + time since last heartbeat + reconnection overhead)CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=96758&sha=d29b41fbe684f8c90ace4fd71828ce0d4ac8b88f&name_0=PR&name_1=Integration%20tests%20%28arm_binary%2C%20distributed%20plan%2C%204%2F4%29
Closes #80359
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Documentation entry for user-facing changes
🤖 Generated with Claude Code