Skip to content

[Flaky Tests] Deflake many-slot-migration under valgrind#3497

Closed
sarthakaggarwal97 wants to merge 1 commit into
valkey-io:unstablefrom
sarthakaggarwal97:fix-many-slot-migration-timeout
Closed

[Flaky Tests] Deflake many-slot-migration under valgrind#3497
sarthakaggarwal97 wants to merge 1 commit into
valkey-io:unstablefrom
sarthakaggarwal97:fix-many-slot-migration-timeout

Conversation

@sarthakaggarwal97

@sarthakaggarwal97 sarthakaggarwal97 commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

tests/unit/cluster/many-slot-migration.tcl has been timing out repeatedly in the dedicated valgrind Daily jobs.

The failure is driven by the amount of work rather than a functional regression: the test loads 40,000 keys and leaves 1,000 slots half-migrated before running cluster fix, which is significantly slower under valgrind.

This change keeps the default coverage unchanged for normal runs, but scales the workload down only when ::valgrind is enabled. Under valgrind, the test now uses 10,000 keys and 250 migrated slots, which still exercises the same cluster repair path while avoiding the repeated CI timeout.

Passing Valgrind Run: https://github.com/sarthakaggarwal97/valkey/actions/runs/24360238670/job/71137719287
Failing CI: https://github.com/valkey-io/valkey/actions/runs/24374139344/job/71183925533#step:8:4797

Signed-off-by: Sarthak Aggarwal <25262500+sarthakaggarwal97@users.noreply.github.com>
@sarthakaggarwal97 sarthakaggarwal97 force-pushed the fix-many-slot-migration-timeout branch from 16211bb to 27383f7 Compare April 14, 2026 04:57
@dvkashapov

Copy link
Copy Markdown
Member

What do you think would be better in this case: scale timeout if under valgrind #3462 or reduce amount of migrations like here?

@sarthakaggarwal97

Copy link
Copy Markdown
Contributor Author

Oh I missed that change somehow. We need a better way to not dedup effort (maybe creating issues for tests will help).
I kinda prefer this change because it targets this specific test. @roshkhatri wdyt? I am fine either ways.

@sarthakaggarwal97 sarthakaggarwal97 marked this pull request as draft April 14, 2026 05:25
@sarthakaggarwal97

Copy link
Copy Markdown
Contributor Author

I will actually mark this PR for draft. I will talk to @roshkhatri as well offline.

@codecov

codecov Bot commented Apr 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.41%. Comparing base (0ec1733) to head (27383f7).
⚠️ Report is 3 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #3497      +/-   ##
============================================
+ Coverage     76.39%   76.41%   +0.01%     
============================================
  Files           157      159       +2     
  Lines         79345    79809     +464     
============================================
+ Hits          60617    60984     +367     
- Misses        18728    18825      +97     

see 32 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.

@sarthakaggarwal97

Copy link
Copy Markdown
Contributor Author

Decided to port this fix in #3462

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