Repository navigation
Fix flaky test_replicated_database_and_unavailable_s3 (digest substring match) - #106571
Conversation
…st exactly The test set the `digest` znode to the sentinel value `123456` and, after a `node2` restart, asserted that the digest had been recomputed by checking that `"123456"` no longer appeared in the full dump of all child znodes under the replica path (`SELECT * FROM system.zookeeper WHERE path = ...`). The recomputed digest is a 64-bit hash; its decimal representation can incidentally contain `123456` as a substring (observed `9101234564970589296`), which made the substring check fail spuriously. Query the `digest` child value specifically and compare it exactly, so the assertions depend only on the digest value and not on the textual layout of the whole znode dump. CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=106423&sha=c63e3b252e8a6bd504220f99031f9ba16a95ce09&name_0=PR&name_1=Integration%20tests%20%28arm_binary%2C%20distributed%20plan%2C%204%2F4%29 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Workflow [PR], commit [18dce43] Summary: ✅ AI ReviewSummaryThis PR fixes a flaky assertion in Final VerdictStatus: ✅ Approve |
…d-db-digest-substring-flaky
|
Merged The sole CI failure, @groeneai, please investigate the failure: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=106571&sha=1913277aa988b1091a42f3ffca676dea2b0703eb&name_0=PR&name_1=Integration%20tests%20%28amd_asan_ubsan%2C%20db%20disk%2C%20old%20analyzer%2C%201%2F6%29 and provide a fix in a separate PR. If a fix is already in progress, link it here. |
LLVM Coverage Report
Changed lines: No C/C++ source files changed — skipping uncovered code analysis. Newly covered by added/modified tests: 499 line(s), 38 function(s) across 144 file(s) · Details Top files
|
|
@alexey-milovidov filed the separate fix at #106695. CIDB cross-PR (last 30 days, all on That Switched the test to Hits in the 30-day window: #103404, #106311, #105010, #105056, #104830, #106025, #100391, #106571, #103229. |
|
Update on the The v1 was switching the test to The follow-up commit fixes the helper itself: PR #106695 still open, 2 commits, awaiting CI rerun. |
`test_hedged_requests/test.py::test_stuck_replica` is chronically flaky
on heavily overcommitted ASan/UBSan integration shards. The failure shape
in CIDB is identical across 9 unrelated PRs in the past 30 days:
pause_container('node_1') did not become observably effective within
90.0s ... still succeed after ~890 probe iterations; last outcome:
server replied (4 bytes)
The probe in `_wait_for_pause_effective` keeps receiving live ClickHouse
exception packets from `node_1` for the entire 90s budget, which proves
that `docker compose pause` returned success while the cgroup freezer
never actually froze the user-space tasks. The existing SIGSTOP fallback
in `ClickHouseCluster.pause_container` only fires when `docker compose
pause` raises an exception, not when it lies about success, so the
escalation path was never taken.
Switch this test to `cluster.pause_container_using_signal`, which uses
`SIGSTOP`/`SIGCONT` from the start. A signal cannot be silently lost the
way the cgroup freezer can, so the pause becomes observable on the very
first probe iteration. Same helper is already used by
`test_postgresql_replica_database_engine` for the same reason.
The change is local to one call site. The chronic flake hit
`Integration tests (amd_asan_ubsan, db disk, old analyzer, 1/6)` in the
following PRs (CIDB, last 30 days): ClickHouse#103404, ClickHouse#106311, ClickHouse#105010, ClickHouse#105056,
ClickHouse#104830, ClickHouse#106025, ClickHouse#100391, ClickHouse#106571, ClickHouse#103229. All show the same
`server replied (4 bytes)` outcome, distinguishing this from generic
flakiness.
Related: ClickHouse#106571
The integration test
test_storage_delta::test_replicated_database_and_unavailable_s3set thedigestznode of aReplicateddatabase replica to the sentinel value123456, then after restartingnode2asserted the digest had been recomputed by checking that"123456"no longer appeared anywhere in the full dump of all child znodes (SELECT * FROM system.zookeeper WHERE path = ...).The recomputed digest is a 64-bit hash; its decimal representation can incidentally contain
123456as a substring (observed value9101234564970589296), making the substring check fail spuriously.The fix queries the
digestchild value specifically and compares it exactly, so the assertions depend only on the digest value rather than on the textual layout of the entire znode dump.CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=106423&sha=c63e3b252e8a6bd504220f99031f9ba16a95ce09&name_0=PR&name_1=Integration%20tests%20%28arm_binary%2C%20distributed%20plan%2C%204%2F4%29
Related: #106423
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not for changelog (changelog entry is not required).
Documentation entry for user-facing changes
🤖 Generated with Claude Code