Repository navigation
Allow the in-flight drain in the staircase test-time exit check - #838
Merged
Merged
Conversation
test_staircase_exits_at_test_time bounded each worker's lifetime at --test-time + 0.5 s. A worker still waits for the replies in flight at the deadline, and on a TSan cluster runner one GET took 1.1 s, so the check failed although memtier behaved as designed. Also allow the run's slowest reply. The #728 bug idled until the next step with nothing in flight, so it still fails: 20.0 s and 6.0 s with a 2-5 ms slowest reply. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…heck Take the slowest reply from the Time-Serie seconds from --test-time on, not the whole run: an early slow reply no longer widens the bound, so a worker that idles past the deadline still fails. Print the bound, and name the (2, 20) case as the #728 guard. Co-Authored-By: Claude Opus 5.5 <[email protected]>
fcostaoliveira
added a commit
that referenced
this pull request
Oct 24, 2026
Picks up #838, the staircase drain bound that failed this branch's TSan cluster job. Co-Authored-By: Claude Opus 5.5 <[email protected]>
fcostaoliveira
added a commit
that referenced
this pull request
Oct 24, 2026
Picks up #828 (TSan crash tests signal only while the main thread sleeps), which fixes this branch's red TSan crash-handler job, and #838. Co-Authored-By: Claude Opus 5.5 <[email protected]>
fcostaoliveira
added a commit
that referenced
this pull request
Oct 24, 2026
Picks up #812, the reconnect deadline-clock fix for the never-started client test that failed this branch's plaintext job, plus #828, #838 and #841. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Problem
test_staircase_exits_at_test_time(added in a7881e0, #742, for #728) bounds each worker thread's lifetime at--test-time + 0.5 s. A worker still waits for the replies that are in flight at the deadline (up toTEST_TIME_DRAIN_GRACE_SECS,client.cpp:420-460), so a slow reply legitimately extends it.On #828's CI run, job "TSAN OSS-CLUSTER API: TCP Plaintext (shard 2/2)" (job 120857056533) failed the
--test-time 2 --step-duration 20case: the worker ran 3.096 s. The progress lines show one thread still alive at 155% with one more op completing, and the GET histogram's maximum is 1097.727 ms: one reply took 1.1 s on the loaded TSan runner, and the thread waited for it as designed.In the last 40 runs each of tsan.yml, asan.yml, ubsan.yml and ci.yml, this is the only failure of the test.
Change
Also allow the slowest reply that arrived after the deadline: the maximum
Max Latencyof theTotalsTime-Serieseconds from--test-timeon, sothread_wall < test_time + 0.5 + drain. An earlier slow reply does not widen the bound (from review: with the whole run'sMax Latency, one 300-700 ms pause at 0.8 s let a worker that idled 0.6-1 s past the deadline pass). The message now prints the bound and the drain.Reproduced locally with
CLIENT PAUSE 1200 ALLat 1.8 s of a--test-time 2staircase run: workers ran 2.99-3.07 s, the paused replies landed in Time-Serie second 2 or 3, and the run passes the new bound (fails the old one).The #728 bug left the event loop idle until the next step tick with nothing in flight, so it still fails. With a binary built from a7881e0^ (before the fix), standalone and 3-shard cluster:
--test-time 2 --step-duration 20--test-time 5 --step-duration 2--test-time 5 --step-duration 3On current master's code the test passes standalone and on a 3-shard cluster. The failed CI run (3.096 s, slowest reply 1.098 s) is inside the new bound of 3.598 s.
Affected versions
Test only, master only: no release tag contains a7881e0.
🤖 Generated with Claude Code