Skip to content

End a run whose connection setup is rejected instead of hanging (cluster replicas, failover, standalone) - #750

Merged
fcostaoliveira merged 5 commits into
masterfrom
fix/737-cluster-replica-auth-hang
Oct 17, 2026
Merged

fcostaoliveira merged 5 commits into
masterfrom
fix/737-cluster-replica-auth-hang

Conversation

@fcostaoliveira

@fcostaoliveira fcostaoliveira commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

When the server rejects a connection setup step (AUTH, SELECT or HELLO) on only some connections, and --reconnect-on-error is off, memtier never ends the run. --connection-stage-timeout does not fire.

  • Cluster, default --read-preference primary, replicas reject AUTH (for example, requirepass is set on the primaries only):
    • A --requests run completes all its requests on the primaries and then hangs.
    • A --test-time run waits out the 10 s grace and then abandons the replica connections as clients that "got no reply to 0 request(s)".
  • Failover onto such a replica: the slot refresh dials it as a primary, AUTH is rejected again, and that shard's requests wait forever, even with --test-time.
  • --read-preference secondary, when the replica's AUTH error is answered before its READONLY reply and a SET reaches the primary first.
  • Standalone, when AUTH is rejected on only some connections: a --requests run hangs. This hangs on master and on 2.5.x.

Root cause

  • Without --reconnect-on-error, reconnect_after_setup_error() did nothing. The rejected connection stayed open with its setup unfinished, never sent a request, and kept its client from ending.
  • The comment said --connection-stage-timeout ends such a failure. It does only until any connection, on any thread, reaches steady state: report_connection_stage_success() then disarms the supervisor. That usually happens at the same time, on the connections that were accepted.
  • In cluster mode memtier also connects to every replica that CLUSTER SLOTS lists, even under --read-preference primary.

Fix

Without --reconnect-on-error, a rejected setup step is handled in one of two ways:

  1. A replica connection under --read-preference primary is not needed: keyed requests go to the primaries, and keyless --command requests that the replica connection would have sent go to the primaries once it is closed.
    • The connection is closed with a warning, logged once per connection. It is not counted as a connection error: memtier chose to drop it, and the run is complete. So such runs still report Connection Errors: 0, as before.
    • It is marked so that the replica path of later slot refreshes does not redial it. Before, every refresh redialed it, was rejected again, and counted another error.
    • If a refresh makes the node a primary, the primary path dials it, and case 2 applies.
  2. Any other connection:
    • Once the run has reached steady state, it ends its thread, so the run fails (exit 1). Unlike a dropped connection, this does not wait for peers that are still in their setup: the server rejected this one, and it is still needed.
    • Before steady state, the rejection is still a startup failure for --connection-stage-timeout (exit 2). The connection checks again every second, because a connection on another thread reaching steady state disarms that timeout.

How totals are computed, and when --requests and --test-time stop a run, are unchanged. What changes is the outcome of a run where a connection that is still needed is rejected: a run that used to hang now fails with exit 1. A --test-time run that used to finish after the 10 s drain grace with exit 0 and incomplete results also exits 1 now. See the release note.

Unchanged:

  • With --reconnect-on-error the connection reconnects as before.
  • Under the other read preferences a rejecting replica is not closed as unneeded.
  • A run in which no connection is accepted still exits 2.

Refactoring: count_connection_error(), disconnect_after_error() (shared with the READONLY path) and end_thread() (shared with attempt_reconnect()).

Options I considered and did not take:

  • Do not connect to replicas at all under primary. This changes the topology and connection-count output and the role-flip path. It is a separate decision.
  • Fail the run when an unneeded replica is rejected. That would fail runs whose results are complete.

Release note

A run with a connection whose AUTH, SELECT or HELLO is rejected, and no --reconnect-on-error, no longer hangs. It fails (exit 1) once the run has started, or exits 2 at --connection-stage-timeout if nothing was accepted. In cluster mode under --read-preference primary, replicas that reject the setup (for example, requirepass set on the primaries only) are closed with a warning; the run exits 0 and reports no connection errors for them.

Exit-code change: a --test-time run in which a connection that is still needed (a primary, or a replica serving reads) is rejected after the run has started used to finish after the 10 s drain grace with exit 0 and incomplete results. It now exits 1. Scripts that relied on exit 0 for such runs will see a failure; the results of those runs were not valid.

Tests

tests/test_connection_setup_rejected.py is a new file. It reuses the scripted _Node and _run() from test_cluster_slots_bad_reply.py, extended with:

  • an AUTH counter, select_error, and auth_reject_first (reject the first N AUTHs, which means N connections);
  • -MOVED every N requests, a custom slot map, extra nodes, and a delay before the first data reply;
  • auth_error_with_next, which sends the AUTH error in the same write as the next reply, as a real Redis answering a pipelined setup does.
test base (master) previous head 4bb84ba this PR
replica rejects AUTH, --requests; JSON Connection Errors == 0 hang pass pass
replica rejects AUTH, --test-time=2 14 s, "got no reply" pass pass
replica rejects SELECT fail pass pass
more than 10 -MOVED refreshes: one AUTH per client, Connection Errors == 0 fail pass pass
failover onto the rejecting replica: exit 1 hang pass pass
second primary rejects AUTH, first data reply delayed so the re-check timer is the only path: exit 1 hang pass pass
secondary, AUTH error answered alone: exit 1 or 2 hang pass pass
secondary + fallback primary, a peer replica in its setup: exit 1 hang exit 0 pass
standalone, AUTH rejected on some of 16 connections (-t 4 -c 4 --requests 2000 --connection-stage-timeout 1): exit 1 in under 8 s hang pass pass
only primary rejects AUTH: exit 2 (pins existing behaviour) pass pass pass
secondaryPreferred: replica not closed, exit 2 (pins existing behaviour) pass pass pass
  • Mutant check: with the timer re-arm removed, the two-primaries test and the standalone test fail in 5/5 runs.
  • Wall-clock bounds: the tightest are now 8 s, against the 20 s kill that a hang hits. They held unpinned, under taskset -c 2 and with RLTest --parallelism 2 (4/4 each), and in CI with PARALLELISM=2. RLTest does not run on macOS here.
  • Flakiness: the 11 tests passed in 10/10 runs (--env oss, MEMTIER_BINARY set).
  • Also passing on this head: test_cluster_slots_bad_reply, test_cluster_readonly_drop, test_reconnect_late_server_start, test_cluster_failover_retry, test_reconnections, test_read_preference_resp3, and test_run_count_exit_code (Exit 2 when any --run-count run hits --connection-stage-timeout #752).

Real 2+2 cluster (requirepass on the primaries only, dummy password), -t 2 -c 5 --test-time 8, with CLUSTER FAILOVER FORCE on a replica 3 s in. The failover took effect in about every other run. In the runs where it did:

  • base: exit 0 after 19-20 s, "got no reply".
  • 1cc026a (the first commit): killed at 45 s in 6/6 runs.
  • 4bb84ba: exit 1 in about 4 s in 6/6 runs.

Merge order with #666

#666 conflicts with this PR in shard_connection.cpp/.h and tests/test_cluster_slots_bad_reply.py. To resolve:

Whichever lands second rebases.

Fixes #737

Affected versions

Cluster: 2.5.0 through 2.5.2 and master. ee757e7 (#456, --read-preference) made cluster mode connect to replicas.

Standalone partial-AUTH hang: the rejected-setup path that leaves the connection open is older (#625), and per the maint lens, 2.5.x hangs too.

Reproduced on master 8ef3971, b1da970 and 63c0009. Per the issue, also reproduced on 2.5.2 f3ff179.

🤖 Generated with Claude Code


Note

Medium Risk
Changes connection lifecycle and thread termination on setup failures across cluster and standalone paths; behavior differs by read preference and steady-state timing, though covered by new integration tests.

Overview
Fixes benchmarks that hang when AUTH/SELECT/HELLO fails on some connections and --reconnect-on-error is off. Rejected connections no longer sit in unfinished setup forever (which blocked clients from finishing and disabled --connection-stage-timeout after another connection reached steady state).

Without reconnect: Under --read-preference primary, cluster replicas that reject setup are closed and marked is_setup_rejected_replica so CLUSTER SLOTS refreshes do not redial them repeatedly; the run can still exit 0. Any other needed connection gets a 1s libevent re-check and end_thread once steady state is reached (exit 1), or stays on --connection-stage-timeout at startup (exit 2). count_connection_error, disconnect_after_error, and end_thread centralize error accounting and teardown (including the READONLY no-reconnect path).

Tests: New test_connection_setup_rejected.py and richer scripted peers in test_cluster_slots_bad_reply.py (pipelined AUTH errors, SELECT failures, periodic -MOVED, partial AUTH rejection).

Reviewed by Cursor Bugbot for commit 8b30858. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

🤖 Automated first-pass review — a human maintainer's review is still required before merge.

Thanks for this. I went through the C++ changes and the new tests. The split into "unneeded replica, close it" and "needed connection, end the thread once steady state is reached" makes sense to me, and pulling out count_connection_error() / disconnect_after_error() / end_thread() makes the READONLY path and attempt_reconnect() easier to follow. A few comments:

  • The description is out of date after the last commit. c13ef78 stops counting the closed replica as a connection error, and the tests now assert Connection Errors == 0. The release note still says "Their rejections now show as non-zero Connection Errors in the JSON, Prometheus and StatsD output", and the test table still says Connection Errors == 2 in two rows. I think the release note should be fixed before merge, since it describes the opposite of the final behaviour.

  • Exit code change for --test-time runs. As I read it, a --test-time run with a still-needed rejected connection used to finish after the 10 s drain grace. Your own real-cluster failover numbers show "base: exit 0 after 19-20 s". Now it exits 1. I agree failing is the right call, because the results really are incomplete. But it's a run that passed before and fails now, not only a hang that's been fixed, and "Totals, the --requests stop condition and the --test-time stop are unchanged" sort of hides that. Maybe add one line to the release note so anyone gating on exit 0 isn't surprised? Not asking for a different design. You already went for the more compatible option on the replica error count, which I think was right.

  • handle_setup_rejected_check_event(): just checking that this is intended. In standalone mode m_conns_manager->get_reqs_answered() can never be non-zero for a client whose only connection was rejected, so there the global connection_stage_steady_state_reached() is what does the work. Is the get_reqs_answered() check there for the cluster case, where a client has another connection that's already answering? If so, a short comment would help the next reader.

  • Requiring m_setup_rejected_context to point to static storage is documented, which is good. It's a bit fragile, though: a later caller passing a formatted buffer would turn into a use-after-scope when the timer fires. All callers today pass literals, so this isn't blocking. Nitpicking: you could copy it into a small member buffer instead of keeping the pointer.

  • test_replica_rejecting_auth_under_secondary_does_not_hang accepts exit 1 or 2. Fine, since the comment explains why and the next test pins exit 1.

The core fix looks solid, and the tests show the fails-on-master / passes-on-head behaviour this repo likes to see (same idea as the regression test in #364). I'd just like the release note fixed and the --test-time exit-code change mentioned before this merges. The shard_connection lifecycle changes may be worth a second look from whoever owns cluster routing, mainly how this interacts with #666.

(I'd file this as a comment, not a formal block.)

@fcostaoliveira
fcostaoliveira force-pushed the fix/737-cluster-replica-auth-hang branch from 52f4284 to 4bb84ba Compare October 16, 2026 22:50
@fcostaoliveira fcostaoliveira changed the title Close a replica connection whose setup is rejected under --read-preference primary End a run whose connection setup is rejected instead of hanging (cluster replicas, failover) Oct 16, 2026
@fcostaoliveira

Copy link
Copy Markdown
Collaborator Author

Thanks. Both questions found real problems, and the new commit 4bb84ba fixes them.

Q1 (refresh redial): yes, on 1cc026a every CLUSTER SLOTS refresh redialed the closed replica. It was rejected again, counted another connection error and logged both lines again; a run with 6 reshards counted 148 connection errors. The connection is now marked when it is closed, and the replica-redial path in handle_cluster_slots() skips it, so it is dialed once. test_replica_rejecting_auth_is_not_redialed_by_slot_refreshes runs more than 10 -MOVED-driven refreshes and asserts that the replica gets one AUTH per client and the JSON shows 2 Connection Errors.

Q2 (failover-promoted node): it did come back through the primary path, and that path was broken. The refresh calls set_role(role_primary) and redials it, AUTH is rejected again, and without --reconnect-on-error the connection stayed open. The run had already reached steady state, so --connection-stage-timeout was disarmed, and the shard's requests waited forever: on a real 2+2 cluster, 1cc026a was killed at 45 s in 6/6 runs. Now set_role(role_primary) clears the mark. A rejected setup on any connection that is still needed ends the thread once the run has reached steady state, so the run fails with exit 1. Before steady state it is left to the stage timeout (exit 2) and checked again every second. This is covered by test_replica_rejecting_auth_fails_run_once_promoted and test_primary_rejecting_auth_fails_run_once_another_primary_runs.

The "carries no requests" wording was wrong for keyless --command workloads; the comment, the warning and the PR body now say the replica is not needed under primary.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4bb84ba. Configure here.

Comment thread shard_connection.cpp Resolved
@fcostaoliveira
fcostaoliveira force-pushed the fix/737-cluster-replica-auth-hang branch 2 times, most recently from dc3b44e to ee747d9 Compare October 17, 2026 00:17
@fcostaoliveira fcostaoliveira changed the title End a run whose connection setup is rejected instead of hanging (cluster replicas, failover) End a run whose connection setup is rejected instead of hanging (cluster replicas, failover, standalone) Oct 17, 2026
@fcostaoliveira

Copy link
Copy Markdown
Collaborator Author

Follow-up on the review points, at ee747d9:

  • (2) Why a 1 s poll instead of an event-driven re-check: report_connection_stage_success() runs on whichever worker thread gets the first workload reply. The rejected connection usually lives on another thread's event_base. An event-driven check would need a locked, cross-thread registry of rejected connections, plus event_active() wakeups on other bases that must not outlive connections freed at thread end. That is a lot of new cross-thread state for a rare error path. The poll is one 1 s timer, armed only on a connection whose setup was rejected and only until steady state, and the run ends at most a second later. A mutant without the re-arm fails the two-primaries and standalone tests in 5/5 runs, so the path is covered.
  • (3) The gettimeofday + update_connection_error + disconnect sequence is now disconnect_after_error(), shared with the READONLY-off path. The error count is count_connection_error(), also used by attempt_reconnect(), and the thread-ending tail is end_thread().
  • (4) The PR body now says that totals and the --requests / --test-time stops are unchanged.
  • Nits:
    • The timer error now names handle_setup_rejected_check_event and checks event_add().
    • I removed the set_role() reset: the mark only affects the replica redial path, and a promoted node is dialed through the primary path anyway. The failover test covers that.
    • The --test-time bound is now 8 s.
    • _run_json() fails with a clear message when the JSON is missing or partial.
    • The PR body has a release-note line.

@fcostaoliveira

Copy link
Copy Markdown
Collaborator Author

Thanks. Answers to the points in this review, at 8b30858 (rebased on 6a8099c):

  • Description vs code: the description no longer says the mark is cleared. It now says: "If a refresh makes the node a primary, the primary path dials it". The mark is checked only in the replica redial path.

  • Exit 1 vs exit 2 under secondary: the timing difference is the intended meaning, and it matches the existing codes.

    • Exit 2 means no connection reached steady state before --connection-stage-timeout: the benchmark never started.
    • Exit 1 means the run started and a thread ended early, so its results are not valid. A dropped connection without --reconnect-on-error and a mid-run CLUSTER SLOTS failure use the same code.
    • In the secondary test the same misconfiguration can land on either side: either a SET reaches the primary before the stage timeout, or it doesn't.
    • Keeping exit 2 for a rejection first seen before steady state would mean setting the stage-abort result from a worker after the supervisor is disarmed. That would blur what Exit 2 when any --run-count run hits --connection-stage-timeout #752 just made exit 2 mean (aborted by --connection-stage-timeout).
    • Both codes are non-zero and both mean "do not use these results".
  • The run_is_over() gap vs retry_cluster_slots_after_error(): there is no gap, because run_is_over() can only be true when this check has already fired.

    • run_is_over() returns finished() when the client has had a reply. Otherwise it returns false unless --test-time is set and steady state has been reached.
    • So run_is_over() true implies get_reqs_answered() or connection_stage_steady_state_reached(), and either of those makes handle_setup_rejected_check_event() end the thread at its next check.
    • The CLUSTER SLOTS retry needs run_is_over() because it keeps retrying after steady state, for a client that has not started. This path stops retrying at steady state.
  • m_setup_rejected_replica lifetime: the field comment now says it is never reset and lasts as long as the object, across disconnect() and role changes. handle_cluster_slots() matches replicas by address, so it always names the same endpoint.

Also in 8b30858: test_standalone_auth_rejected_on_some_connections_fails_run asserted exact AUTH counts (16 requests, 4 rejections). When the first rejected connection ends its thread, the run fails, and threads that have not dialed yet never send AUTH. The test now asserts at least 5 AUTHs, 1 to 4 rejections, rc 1 and the time bound. It passed 8/8 pinned with taskset -c 2 and 8/8 unpinned, and the whole file passed 8/8 under taskset -c 2. The other exact counts in the file are from runs that exit 0, where every client dials at bootstrap, and they held in all of those runs.

fcostaoliveira and others added 5 commits October 17, 2026 02:41
…rence primary

In cluster mode memtier connects to every replica CLUSTER SLOTS lists, even
under the default --read-preference primary, where they carry no request.
When a replica rejects AUTH (for example, requirepass is set on the
primaries only) and --reconnect-on-error is off, reconnect_after_setup_error()
did nothing: the connection stayed open with its setup unfinished, and the
replies pipelined behind AUTH were left unparsed, so it kept pending
responses. The primaries reach steady state at the same time and disarm
--connection-stage-timeout, so nothing ended the run: a --requests run hung
after its last request, and a --test-time run waited out the 10 s grace and
abandoned the replica connections as clients that got no reply.

Close such a connection instead, as a READONLY error already does, and count
it as a connection error. The run then ends on the primaries. Other read
preferences send reads to the replica, so its rejected setup is still left
to --connection-stage-timeout, unchanged.

Fixes #737

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The first commit closed a replica connection whose AUTH/SELECT/HELLO was
rejected under --read-preference primary. That left two problems:

- A failover onto such a replica hung the run, even with --test-time. The
  slot refresh dials the node as a primary, its AUTH is rejected again, and
  without --reconnect-on-error reconnect_after_setup_error() left the
  connection open. The shard's requests then waited forever. The comment
  said --connection-stage-timeout ends this, but the run had already
  reached steady state, which disarms it. The same happens to a replica
  under --read-preference secondary when its AUTH error arrives before the
  READONLY reply and a SET reaches the primary first.
- Every slot refresh redialed the closed replica, which was rejected,
  counted as a connection error and logged again.

Now, without --reconnect-on-error, a rejected setup on a connection that is
still needed ends the thread once the run has reached steady state, as a
dropped connection does, so the run fails (exit 1). Before steady state it
is still left to --connection-stage-timeout (exit 2), and is checked again
every second, since another connection reaching steady state disarms the
timeout. A replica closed under --read-preference primary is marked and not
redialed by slot refreshes until its role changes to primary.

The warning no longer says the replica carries no requests: with keyless
--command workloads it does, and those requests go to the primaries once it
is closed.

Fixes #737

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…setup

Address review of the setup-rejection path (#737):

- Under a read preference other than primary, a rejected replica that was
  checked after steady state went through attempt_reconnect(), which leaves
  a connection dead while a peer on the same client is still in its setup.
  The run then exited 0 without that replica. The connection was rejected,
  not dropped, and is still needed, so end the thread directly.
- Factor the connection-error count, the disconnect-and-count sequence of
  the READONLY and unneeded-replica paths, and the thread-ending path into
  helpers.
- Check event_add() when arming the re-check timer, and name the right
  function in its error.
- Drop the set_role() reset of the unneeded-replica mark. The mark only
  affects the replica redial path, and a node a refresh makes a primary is
  dialed through the primary path anyway.
- Move the setup-rejection tests to test_connection_setup_rejected.py and
  add: a replica rejected while another replica is in its setup
  (--read-preference secondary), a standalone run where 4 of 16 connections
  are rejected (it hung on master), and a delayed first reply so the
  two-primaries test always goes through the re-check timer.

Fixes #737

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Once the first rejected connection ends its thread, the run fails and the
threads that have not dialed yet never send AUTH, so the server may see
fewer than 16 AUTH requests and fewer than 4 rejections (seen under
taskset). Assert at least one rejected and one accepted connection
instead, and keep the exit code and time bound.

Also note at m_setup_rejected_replica that it is never reset.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…error

Under --read-preference primary, a replica connection whose setup is
rejected is closed because the run does not need it. Such runs exited 0
with no connection errors before this branch; counting it now would break
anyone gating on Connection Errors == 0 for a run that went fine. Keep the
warning (once per connection, since it is not redialed) and drop the count.
Rejected connections that end the thread still count, and the READONLY-off
path is unchanged.

Also say that m_setup_rejected_context must point to static storage, note
that the secondary does-not-hang test only guards against the hang, and
widen the 5 s wall-clock bounds to 8 s (all well under the 20 s kill).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@fcostaoliveira
fcostaoliveira force-pushed the fix/737-cluster-replica-auth-hang branch from 8b30858 to c13ef78 Compare October 17, 2026 01:50
@fcostaoliveira

Copy link
Copy Markdown
Collaborator Author

Replies to the review edited at 01:08, at c13ef78 (rebased on 63bc752):

  1. Connection-error accounting for a replica we close on purpose: agreed, and changed. Under --read-preference primary an unneeded replica whose setup is rejected is now closed with a warning and not counted as a connection error. Such runs still exit 0 and report Connection Errors: 0, as they did before. The warning is logged once per connection, because the connection is not redialed. Rejected connections that end the thread still count. The READONLY-off path is unchanged, since its counting predates this PR. The two tests that asserted Connection Errors == 2 now assert 0, and the release note in the description is updated.

  2. Reuse of shard_connection objects for another endpoint: I confirmed that nothing does this. In cluster_client:

    • handle_cluster_slots() reuses an existing object only after matching it by address and port, for primaries and replicas alike. A new endpoint gets a new object from create_shard_connection().
    • connect_shard_connection() calls set_address_port() with that same matched address.
    • Connections left with no slots are disconnected and never re-pointed.
    • cluster_client::disconnect(), used on --reconnect-interval, deletes every connection except the main one. The main one always dials the configured --server.

    So m_setup_rejected_replica always describes the same endpoint for the object's lifetime.

  3. m_setup_rejected_context: the field comment now says it must point to static storage (a string literal), because it is read when the re-check timer fires. All callers pass literals.

  4. Wall-clock bounds: I widened the tightest bounds from 5 s to 8 s. A hang still hits the 20 s kill, so the tests still tell the two apart. The bounds held unpinned, under taskset -c 2 and with RLTest --parallelism 2 (4/4 each), and in CI with PARALLELISM=2. RLTest is not run on macOS in this CI.

  5. test_replica_rejecting_auth_under_secondary_does_not_hang: its comment now says it only guards against the hang, and that test_replica_rejecting_auth_under_secondary_ends_thread_while_peer_in_setup pins exit 1.

  6. _Node/_run imported from another test module: acknowledged. If a third file needs the scripted node, it should move to a shared helper module, for example tests/scripted_resp_node.py. I'd do that as a follow-up rather than grow this PR.

On merge order: #666 has not merged yet, so this lands first, and the description shows how #666 resolves the conflict on top of it.

@fcostaoliveira

Copy link
Copy Markdown
Collaborator Author

Replies to the review edited at 01:08 (head unchanged at c13ef78; this pass only edits the description):

  • Out-of-date description: fixed. The release note now says that closed, unneeded replicas are not counted: the run exits 0 and reports no connection errors for them. Both test-table rows say Connection Errors == 0.
  • Exit-code change for --test-time runs: agreed. The release note has a new Exit-code change line. Before, a --test-time run in which a connection that is still needed is rejected after the run has started finished after the 10 s drain grace with exit 0 and incomplete results; it now exits 1. I reworded the "unchanged" sentence: only how totals are computed and when --requests / --test-time stop a run are unchanged. The outcome of such a run is not.
  • get_reqs_answered() in handle_setup_rejected_check_event(): yes, that check is for the cluster case, where another shard connection of the same client is already answering. In standalone mode a client has one connection, so the global connection_stage_steady_state_reached() does the work, as you say. I'm leaving the code as it is so CI stays green for the merge. If a maintainer wants a comment there, I'll add it in a follow-up.
  • m_setup_rejected_context as a pointer to static storage: acknowledged. Copying it into a small member buffer is a reasonable hardening follow-up; today every caller passes a literal and the field comment requires it.
  • test_replica_rejecting_auth_under_secondary_does_not_hang: acknowledged; its comment explains why it accepts exit 1 or 2, and the peer-in-setup test pins exit 1.

@fcostaoliveira
fcostaoliveira merged commit 3093d17 into master Oct 17, 2026
129 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cluster --requests run hangs forever when AUTH fails on a replica connection (replica has no password); --connection-stage-timeout does not fire

1 participant