Repository navigation
Fix flaky test_rabbitmq_mv_combo: keep polling while consumption progresses - #109892
Conversation
…resses test_rabbitmq_mv_combo used a fixed 180s wall-clock deadline for the row-count check. Consuming ~1 mln rows takes ~125s under thread sanitizer (8-13k rows/s) and can exceed the deadline on a loaded runner while consumption is still steadily progressing, causing a spurious pytest.fail at test.py:785. Reset the no-progress deadline whenever the total row count across the 5 materialized views increases, so the test only fails on a genuine stall. This mirrors the check_expected_result_polling helper already used by the other RabbitMQ streaming tests. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-worker-slot-1:20260709-123900 |
|
cc @antaljanosbenjamin — could you review? Small test-robustness fix: makes |
|
Workflow [PR], commit [6edf3b2] Summary: ✅ AI ReviewSummaryThis PR replaces the fixed 180-second wall-clock check in Missing context / blind spots
Final Verdict
|
|
@pamarcos maybe you can review this 😄 |
|
Good, this is a similar approach of what we've taken lately witn rabbitmq and sanitized builds that expire. |
579786e
…ening the timeout Since ClickHouse#109170 fixed parallel_view_processing being ignored, MV fan-out is serialized by default (setting defaults to false). This genuinely slowed down `RabbitMQ`'s internal insert-to-views pipeline for the 5 materialized views in this test, which had been relying on the previously-buggy always-parallel behavior. ClickHouse#109892 masked the slowdown by making the test's no-progress deadline reset on progress instead of addressing the throughput regression, which is reverted here. Set `parallel_view_processing = 1` in the test's default profile, which is the only place this setting can be applied for RabbitMQ's internal insert context (it can't be set via `CREATE TABLE ... SETTINGS` or session `SET`, since `StorageRabbitMQ` captures the global context at construction). Verified with the CI msan binary: 188s (serial, default) vs 119s (parallel) for the underlying consumption; combined with the revert, the test now passes in ~124s against the original fixed 180s deadline.
…-test_rabbitmq_mv_combo-progress Fix flaky test_rabbitmq_mv_combo: keep polling while consumption progresses
…ening the timeout Since ClickHouse#109170 fixed parallel_view_processing being ignored, MV fan-out is serialized by default (setting defaults to false). This genuinely slowed down `RabbitMQ`'s internal insert-to-views pipeline for the 5 materialized views in this test, which had been relying on the previously-buggy always-parallel behavior. ClickHouse#109892 masked the slowdown by making the test's no-progress deadline reset on progress instead of addressing the throughput regression, which is reverted here. Set `parallel_view_processing = 1` in the test's default profile, which is the only place this setting can be applied for RabbitMQ's internal insert context (it can't be set via `CREATE TABLE ... SETTINGS` or session `SET`, since `StorageRabbitMQ` captures the global context at construction). Verified with the CI msan binary: 188s (serial, default) vs 119s (parallel) for the underlying consumption; combined with the revert, the test now passes in ~124s against the original fixed 180s deadline.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
test_rabbitmq_mv_comboused a fixed 180s wall-clock deadline for the final row-count check. Consuming ~1 mln rows takes ~125s under thread sanitizer (8-13k rows/s), so on a loaded msan/tsan runner the deadline can be reached while consumption is still steadily progressing, producing a spuriouspytest.failattest.py:785.Fix: reset the no-progress deadline whenever the total row count across the 5 materialized views increases, so the test only fails on a genuine stall. This mirrors the
check_expected_result_pollinghelper already used by the other RabbitMQ streaming tests (added in #106200 / #107813).CI evidence (test failed initially, passed on retry,
retry_ok):Integration tests (amd_msan, 6/8): https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=8a863a7cc54952795148dcd2eba58fdcd5480ec5&name_0=MasterCI&name_1=Integration%20tests%20%28amd_msan%2C%206%2F8%29No related open issue found.
Version info
26.7.1.725(included in26.7and later)