Skip to content

MOD-19933: Adopt benchmark SSH connection retries - #1719

Merged
gabsow merged 1 commit into
masterfrom
codex/mod19933-benchmark-retry-adoption
Nov 29, 2026
Merged

gabsow merged 1 commit into
masterfrom
codex/mod19933-benchmark-retry-adoption

Conversation

@gabsow

@gabsow gabsow commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

A transient SSH connection refusal failed the RedisJSON nightly benchmark before measurement began. Bump redisbench-admin from 0.12.39 to 0.12.40 to adopt the merged connection-establishment retry fix in redis-performance/redisbench-admin#570. Remote commands and measurements are not replayed; the comparison retry policy is unchanged.

Release scope: 0.12.40 also includes upstream #567 (CPU-summary corrections and per-shard metrics), #568 (background-client support), password masking, and documentation changes. The connection retry itself does not replay commands or measurements; the dependency release has this broader scope. Both benchmark comparison arms use the same requirements pin.

Reviewer verification (Liran): local run-remote against Docker/sshd passed normally and recovered from initial connection refusal and SSH-banner errors, where 0.12.39 failed. Each outage case executed redis-benchmark exactly once. Real EC2/x86 execution and the unused background-client feature were not covered.

Validation against the released packages in an isolated Python 3.14 environment:

  • RedisJSON's actual compare_aws.remote_commands wrapper with an injected NoValidConnectionsError: 0.12.39 fails; 0.12.40 reconnects and executes the command exactly once. A subsequent command failure still propagates without replay.
  • All eight upstream connection-retry regression tests pass: immediate success, bounded timeout, refused/timed-out/banner recovery, exhausted budget, authentication rejection, and no failed-command replay. Together with the two downstream cases: 10 passed.
  • pip check, CLI help and git diff --check passed.

These are local fault-injection checks using the installed releases, not a live AWS benchmark or a new natural reproduction of the historical outage. No cloud resources were created. MOD-19933 remains open pending merged adoption.

Jira: https://redislabs.atlassian.net/browse/MOD-19933


Note

Low Risk
Single pinned dependency version bump in benchmark test requirements only; no production or application runtime changes.

Overview
Bumps the benchmark harness dependency redisbench-admin from 0.12.39 to 0.12.40 in tests/benchmarks/requirements.txt.

That release picks up the upstream SSH connection-establishment retry fix (redisbench-admin#570), so transient refused connections during remote benchmark setup (e.g. compare_aws / run-remote) can recover instead of aborting before measurements. Command-level failures and comparison retry behavior are unchanged for the SSH retry fix; the release also includes the additional changes listed above.

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

@codecov

codecov Bot commented Nov 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.89%. Comparing base (e6a8fa6) to head (ada1262).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1719   +/-   ##
=======================================
  Coverage   87.89%   87.89%           
=======================================
  Files          18       18           
  Lines        6756     6756           
=======================================
  Hits         5938     5938           
  Misses        818      818           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LiranAbir LiranAbir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed and tested locally. Looks good. One correction to the description, plus test results.

The release contains more than #570
v0.12.39...v0.12.40 is 5 upstream commits, not only the SSH connect retry:

  • #567: reworks the shard CPU summary. It fixes an off-by-one in the interval loop, resets CPU stats per run, and adds 5 per-shard CPU metrics next to total_shards_used_cpu_pct.
  • #568: adds concurrent background-client support, touching run-local and run-remote (remote_client.py, run_local.py).
  • Masking of passwords in logged commands, plus README/docs changes.

So "only reconnection during initial connect is affected" isn't accurate. None of these change the throughput fields the comparison gates on. Both arms of the nightly also install the same requirements.txt, so the comparison stays like-for-like. Still, the description should mention these changes.

Local run-remote test
PR CI covers run-local: command-benchmark installs 0.12.40 from this branch. run-remote only runs in the AWS nightly, so I ran it locally against a Docker host (Redis 8.10.1 with its bundled ReJSON, plus sshd). I used redisbench-admin run-remote --inventory … with the same flags compare_aws.py passes, Python 3.11 and the json_set_num_0 workload:

Scenario 0.12.39 0.12.40
Normal run (13 s) pass, 296,274 rps pass, 301,864 rps
SSH refused for 5 s at start (NoValidConnectionsError, as in the nightly) fails on first connect 2 retries, then the run passes
SSH banner error for 5 s fails 2 retries, then the run passes

In both outage runs, redis-benchmark ran exactly once, so nothing was replayed. The result JSON keeps the same Tests.Overall fields; 0.12.40 adds a Measurements block with the CPU summary. On very short runs (fewer than 2 CPU samples), CPU is now reported as n/a instead of 0.000%, which is intended upstream behaviour.

Not covered: real EC2 hosts and x86, the compare_aws.py wrapper as a whole, and the background-client feature (unused here).

Nit
tests/benchmarks/compare_local.py:23 says "redisbench-admin 0.12.39 decodes … as ASCII". 0.12.40 still does this (redis_benchmark.py:191), so the workaround is still needed. Consider dropping the version number from the comment so nobody removes the workaround by mistake.

Side note (upstream, not this PR): when run-remote fetches result files over SFTP, it ignores --db_ssh_port / --client_ssh_port and always uses port 22. This doesn't matter on AWS.

@gabsow
gabsow merged commit ff23290 into master Nov 29, 2026
67 checks passed
@gabsow
gabsow deleted the codex/mod19933-benchmark-retry-adoption branch November 29, 2026 14:10
@gabsow

gabsow commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed the remaining comment nit in #1720 (c2e3f8b): removed the obsolete 0.12.39 qualifier and retained the Unicode workaround. Verified identical executable AST and Unicode/ASCII JSON-value preservation. The broader release scope was also corrected in #1719’s description before merging. Requested your review on the follow-up.

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.

2 participants