Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky init_test proc in maxmemory test suite #1419

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

zuiderkwast
Copy link
Contributor

The following error has been seen, but not reliably reproduced:

*** [err]: eviction due to output buffers of pubsub, client eviction: true in tests/unit/maxmemory.tcl
Expected '42' to be equal to '50' (context: type proc line 17 cmd {assert_equal [r dbsize] 50} proc ::init_test level 2)

The reason is probably that FLUSHDB is asynchronous and when we start populating new keys, they are evicted because the background flush is too slow. Changing this to FLUSHDB SYNC prevents this.

The following error has been seen, but not reliably reproduced:

```
*** [err]: eviction due to output buffers of pubsub, client eviction: true in tests/unit/maxmemory.tcl
Expected '42' to be equal to '50' (context: type proc line 17 cmd {assert_equal [r dbsize] 50} proc ::init_test level 2)
```

The reason is probably that FLUSHDB is asynchronous and when we
start populating new keys, they are evicted because the background
flush is too slow. Changing this to FLUSHDB SYNC prevents this.

Signed-off-by: Viktor Söderqvist <[email protected]>
Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.86%. Comparing base (2dfe25b) to head (825ad89).
Report is 2 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1419      +/-   ##
============================================
+ Coverage     70.84%   70.86%   +0.01%     
============================================
  Files           118      118              
  Lines         63612    63612              
============================================
+ Hits          45068    45077       +9     
+ Misses        18544    18535       -9     

see 14 files with indirect coverage changes

@zuiderkwast zuiderkwast requested a review from ranshid December 10, 2024 18:18
@zuiderkwast zuiderkwast added the test-failure An issue indicating a test failure label Dec 10, 2024
Copy link
Member

@ranshid ranshid left a comment

Choose a reason for hiding this comment

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

LGTM

@ranshid ranshid merged commit b4c2a18 into valkey-io:unstable Dec 10, 2024
47 checks passed
@zuiderkwast zuiderkwast deleted the fix-maxmemory-init-test branch December 10, 2024 19:00
vudiep411 pushed a commit to Autxmaton/valkey that referenced this pull request Dec 15, 2024
The following error has been seen, but not reliably reproduced:

```
*** [err]: eviction due to output buffers of pubsub, client eviction: true in tests/unit/maxmemory.tcl
Expected '42' to be equal to '50' (context: type proc line 17 cmd {assert_equal [r dbsize] 50} proc ::init_test level 2)
```

The reason is probably that FLUSHDB is asynchronous and when we start
populating new keys, they are evicted because the background flush is
too slow. Changing this to FLUSHDB SYNC prevents this.

Signed-off-by: Viktor Söderqvist <[email protected]>
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
None yet
Development

Successfully merging this pull request may close these issues.

2 participants