Skip to content

Fix large-memory tests by reducing allocation size#3224

Merged
zuiderkwast merged 2 commits intovalkey-io:unstablefrom
Nikhil-Manglore:large_memory_test
Feb 17, 2026
Merged

Fix large-memory tests by reducing allocation size#3224
zuiderkwast merged 2 commits intovalkey-io:unstablefrom
Nikhil-Manglore:large_memory_test

Conversation

@Nikhil-Manglore
Copy link
Member

Large-memory tests were failing with "I/O error reading reply" after the first test EVAL - JSON string encoding a string larger than 2GB. Three tests that shared a single server instance led to cascading failures when the first test's 3GB allocation left the server in a memory-stressed state.

This PR isolates each test by starting its own server. Additionally, I've reduced the JSON encoding test size from 3GB to 2.25GB. This included changing the allocated 1GB string (concatenated 3x) to a 750MB string to avoid memory exhaustion while still testing strings greater than 2GB like we intended.

Signed-off-by: Nikhil Manglore <[email protected]>
Signed-off-by: Nikhil Manglore <[email protected]>
Copy link
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.

@Nikhil-Manglore nice! Can you also link a daily test link from your forked repo?

@Nikhil-Manglore Nikhil-Manglore marked this pull request as ready for review February 17, 2026 20:56
@Nikhil-Manglore
Copy link
Member Author

@sarthakaggarwal97 https://github.com/Nikhil-Manglore/valkey/actions/runs/22112870882/job/63913353155

The test-sanitizer-undefined-large-memory for gcc and clang both pass now. I'll keep the original issue open since we're still getting failures for the sanitizer address

Copy link
Contributor

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

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

Nice!

@zuiderkwast zuiderkwast merged commit b407b23 into valkey-io:unstable Feb 17, 2026
57 checks passed
@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (223bfa8) to head (1d241ea).
⚠️ Report is 8 commits behind head on unstable.

Additional details and impacted files
@@       Coverage Diff        @@
##   unstable   #3224   +/-   ##
================================
================================
🚀 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.

@Nikhil-Manglore Nikhil-Manglore deleted the large_memory_test branch February 17, 2026 23:49
harrylin98 pushed a commit to harrylin98/valkey_forked that referenced this pull request Feb 19, 2026
Large-memory tests were failing with "I/O error reading reply" after the
first test `EVAL - JSON string encoding a string larger than 2GB`. Three
tests that shared a single server instance led to cascading failures
when the first test's 3GB allocation left the server in a
memory-stressed state.

This PR isolates each test by starting its own server. Additionally,
I've reduced the JSON encoding test size from 3GB to 2.25GB. This
included changing the allocated 1GB string (concatenated 3x) to a 750MB
string to avoid memory exhaustion while still testing strings greater
than 2GB like we intended.

---------

Signed-off-by: Nikhil Manglore <[email protected]>
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.

3 participants