Repository navigation
Fix flaky test test_nats_jet_stream_skipped_broken_message_is_not_redelivered_after_reconnect - #124849
Conversation
…elivered_after_reconnect The test needs the broker restart to land inside the streaming cycle that holds the skipped message, since only that cycle can do the in-source recovery and the test cannot retry. With `nats_flush_interval_ms = 30000` that cycle lasted 30 s from its start. In the failed job `docker kill` of the broker took 32.4 s (dockerd: "Container failed to exit within 10s of kill - trying direct SIGKILL"), so the cycle ended before the reconnect, the background task recovered the subscription between cycles, and the wait for the in-source recovery line expired: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=124700&sha=36167c0b2625e48cbd2369a3b19e22676b78c4ad&name_0=PR&name_1=Integration%20tests%20%28amd_msan%2C%20targeted%29 Use a 300 s flush interval, still below the consumer's 600 s ACK wait, so the cycle stays open across any restart the module tolerates, and `nats_max_block_size = 1`: a skipped message yields no rows and cannot end the cycle, while the good row published at the end ends it at once. The test no longer waits out the flush interval (per-arm p50 31.4 s -> 6.6-7.5 s locally). The assertions are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex): 0 findings. My own cold review of the same diff (engine side of
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-9:20261009-071600 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-41:20261009-061700 |
|
Workflow [PR], commit [497a204] Summary: ✅ AI ReviewSummaryReviewed #124849 at Missing context / blind spots
Final VerdictStatus: ✅ Approve |
CI finish ledger - 45b9413Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
All 163 check runs completed and Session id: cron:our-pr-ci-monitor:20261009-083002 |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix flaky test
test_nats_jet_stream_skipped_broken_message_is_not_redelivered_after_reconnect.Description
Related: #119301 (re-landed this test).
The
[hard_kill]arm failed withno streaming source performed an in-source recoveryinIntegration tests (amd_msan, targeted)(report). It is the test's only failure in 30 days, and no issue exists for it.The broker restart has to land inside the streaming cycle that holds the skipped message, because only that cycle can do the in-source recovery, and the test cannot retry. That cycle lasted
nats_flush_interval_ms = 30000. In the failed job,docker killof the broker took 32.4 s instead of about 0.2 s (dockerd:Container failed to exit within 10s of kill - trying direct SIGKILL). The cycle ended first (Reschedule streaming. Unable to restore connection), the client reconnected between cycles, and the background task recovered the subscription instead.The table now uses
nats_flush_interval_ms = 300000, which is still below the consumer's 600 s ACK wait, andnats_max_block_size = 1. A skipped message yields no rows, so it cannot end the cycle, while the good row published at the end ends it at once. The test therefore no longer waits out the flush interval. The assertions are unchanged.Validation (native pytest, master debug binary):
docker kill(local patch, not committed), the test fails 3/3 before the change with the CI error and passes 3/3 after it.NATSSource.cpp), the changed test fails 2/2, as the original test does.test_nats_jet_stream.pymodule passes (59 tests).Workflow [PR]
Sync PR [sync-upstream/pr/124849]
Version info
26.11.1.2885-master(included in26.11and later)