Skip to content

Fix some flaky tests using CLIENT REPLY OFF#3452

Merged
enjoy-binbin merged 1 commit intovalkey-io:unstablefrom
zuiderkwast:fix-flaky-main-db-not-affected-when-fail-to-diskless-load
Apr 8, 2026
Merged

Fix some flaky tests using CLIENT REPLY OFF#3452
enjoy-binbin merged 1 commit intovalkey-io:unstablefrom
zuiderkwast:fix-flaky-main-db-not-affected-when-fail-to-diskless-load

Conversation

@zuiderkwast
Copy link
Copy Markdown
Contributor

Some test cases write thoughsands of commands in a pipeline and afterwards read the replies. This can lead to TCP ACK being dropped and the connection broken. CLIENT REPLY OFF prevents this.

"Main db not affected when fail to diskless load" in cluster/diskless-load-swapdb has been observed to be flaky.

The others are just defensive but they follow the same pattern.

Similar fixes in the past: #3430, #2483.

Some test cases write thoughsands of commands in a pipeline and
afterwards read the replies. This can lead to TCP ACK being dropped
and the connection broken. CLIENT REPLY OFF prevents this.

"Main db not affected when fail to diskless load" in
cluster/diskless-load-swapdb has been observed to be flaky.

The others are just defensive but they follow the same pattern.

Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.50%. Comparing base (2585f60) to head (b36008c).
⚠️ Report is 1 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #3452      +/-   ##
============================================
- Coverage     76.57%   76.50%   -0.08%     
============================================
  Files           157      157              
  Lines         79026    79026              
============================================
- Hits          60515    60458      -57     
- Misses        18511    18568      +57     

see 22 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@sarthakaggarwal97 sarthakaggarwal97 left a comment

Choose a reason for hiding this comment

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

Looks good!

@enjoy-binbin enjoy-binbin merged commit c35dbdf into valkey-io:unstable Apr 8, 2026
58 of 59 checks passed
@zuiderkwast zuiderkwast added the test-failure An issue indicating a test failure label Apr 8, 2026
@github-project-automation github-project-automation Bot moved this to To be backported in Valkey 8.1 Apr 8, 2026
@github-project-automation github-project-automation Bot moved this to To be backported in Valkey 7.2 Apr 8, 2026
@github-project-automation github-project-automation Bot moved this to To be backported in Valkey 9.1 Apr 8, 2026
@github-project-automation github-project-automation Bot moved this to To be backported in Valkey 8.0 Apr 8, 2026
@github-project-automation github-project-automation Bot moved this to To be backported in Valkey 9.0 Apr 8, 2026
sarthakaggarwal97 pushed a commit to sarthakaggarwal97/valkey that referenced this pull request Apr 16, 2026
Some test cases write thoughsands of commands in a pipeline and
afterwards read the replies. This can lead to TCP ACK being dropped and
the connection broken. CLIENT REPLY OFF prevents this.

"Main db not affected when fail to diskless load" in
cluster/diskless-load-swapdb has been observed to be flaky.

The others are just defensive but they follow the same pattern.

Similar fixes in the past: valkey-io#3430, valkey-io#2483.

Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
sarthakaggarwal97 added a commit to sarthakaggarwal97/valkey that referenced this pull request Apr 16, 2026
Cherry-pick of c35dbdf from unstable.
Fixes corrupt-dump-fuzzer, rdb COW test, diskless-load-swapdb, and
module lazyfree test by using CLIENT REPLY OFF to prevent TCP backpressure.

Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>
sarthakaggarwal97 added a commit to sarthakaggarwal97/valkey that referenced this pull request Apr 16, 2026
Cherry-pick of c35dbdf from unstable.

Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>
sarthakaggarwal97 added a commit to sarthakaggarwal97/valkey that referenced this pull request Apr 16, 2026
Cherry-pick of c35dbdf from unstable.

Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>
sarthakaggarwal97 added a commit to sarthakaggarwal97/valkey that referenced this pull request Apr 16, 2026
Cherry-pick of c35dbdf from unstable.
Adapted: valkey_deferring_client -> redis_deferring_client.
Note: diskless-load-swapdb.tcl is at tests/cluster/tests/ on 7.2
(moved to tests/unit/cluster/ on later branches).

Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>
sarthakaggarwal97 added a commit to sarthakaggarwal97/valkey that referenced this pull request Apr 16, 2026
Use CLIENT REPLY OFF pattern in the defrag eval scripts test which
pipelines 50,000 script loads + 50,000 set commands. Without this,
the TCP send buffer fills up causing 'I/O error reading reply'.

Same CLIENT REPLY OFF pattern as valkey-io#3430 and valkey-io#3452.

Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test-failure An issue indicating a test failure

Projects

Status: To be backported
Status: To be backported
Status: To be backported
Status: To be backported
Status: To be backported

Development

Successfully merging this pull request may close these issues.

4 participants