Backport #107119 to 25.8: Fix flaky test_async_load_databases::test_materialized_views_replicated#108917
Conversation
…aterialized_views_replicated Cherry-pick of the test-only fix merged to `master` in #107119 (commit `6166517952c1`, change `e5479ff4869`). The fix is absent on `25.8`, where `test_materialized_views_replicated` still uses `disconnect_event.wait(90)` and un-timed INSERTs. Under sanitizers the server stop+start budget alone is ~120s, so a restart slower than the ignored 90s wait let the main thread race ahead, and an INSERT to a half-restarted server could block up to 600s and exhaust the 900s pytest session timeout. The fix waits 180s and asserts it, bounds each INSERT with `timeout=60`, catches `QueryTimeoutExceedException`, and stops the warm-up INSERT loop once the restart finishes or its budget elapses. This clears the `test_async_load_databases` failures observed on the `25.8` base and on `backport/25.8/*` PRs (e.g. #107889). True `master` has been clean since #107119 merged (2026-06-18). Closes: #108914 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Workflow [BackportPR], commit [7154c69] |
|
The only CI failure ( The backported tests themselves pass: The failing test is This is the known race tracked in #82719 and fixed on I opened the backport of that fix to |
|
Update: the re-run of This confirms the earlier analysis: the failure was the flaky Keeper TSan data race (#82719), not anything in this test-only backport. The backported tests The durable fix for the underlying race is the |
|
Merged the base `25.8` into this branch (`3e51fbda` → `7154c699`, The branch was ~1 day / 21 commits behind `25.8` and still showed a stale `FAILURE` commit status for `Integration tests (amd_tsan, 6/6)` (the flaky Keeper TSan The durable fix #108965 (backport of #100396 to `25.8`) merged into the base at 05:43 UTC today, so this merge pulls it in. The fresh |
Closes: #108914
Related: #107119
Related: #107889
Backport of the test-only fix #107119 (commit
6166517952c1) to the25.8release branch. The fix landed onmasteron 2026-06-18 but was never backported, sotest_async_load_databases::test_materialized_views_replicatedand::test_materialized_views_cascaded_multiplekeep flaking on the25.8base and on everybackport/25.8/*pull request built on it (e.g. #107889).On
25.8the test still usesdisconnect_event.wait(90)(return value ignored) and un-timed INSERTs. Under sanitizers the server stop+start budget alone is ~120s, so a restart slower than the ignored 90s wait lets the main thread race ahead, and an INSERT to a half-restarted server can block up to 600s and exhaust the 900s pytest session timeout. The fix waits 180s and asserts it, bounds each INSERT withtimeout=60, catchesQueryTimeoutExceedException, and stops the warm-up INSERT loop once the restart finishes or its budget elapses.Since #107119 merged, the CI database shows
masterclean (1879 OK / 0 FAIL across all sanitizers) while25.8still shows failures (59 OK / 7 FAIL) — full breakdown in #108914.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
Version info
25.8.26.9