-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Fix replication on expired key test timing issue, give it more chances #11548
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 replication on expired key test timing issue, give it more chances #11548
Conversation
In replica, the key expired before master's `INCR` was arrived, so INCR
creates a new key in the replica and the test failed.
```
*** [err]: Replication of an expired key does not delete the expired key in tests/integration/replication-4.tcl
Expected '0' to be equal to '1' (context: type eval line 13 cmd {assert_equal 0 [$slave exists k]} proc ::test)
```
This test is very likely to do a false positive if the `wait_for_ofs_sync`
takes longer than the expiration time, so give it a few more chances.
The test was introduced in redis#9572.
|
First reported at #9572 (review) |
|
I guess there is no way to make it pass every time, so retrying the test case 10 times sounds good. How about increasing the TTL of k, would that make it fail less often? |
i guess it will, but then we also need to increase the time of after, so I think a simple retry can make it work better |
zuiderkwast
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
thank you for taking care of this. i think that if we bother to fix it, maybe instead of 10 retries of 1 second (which could still repeatedly fail on a slow system), i'd rather go with 5 retries of increasing timeout. |
#11548) In replica, the key expired before master's `INCR` was arrived, so INCR creates a new key in the replica and the test failed. ``` *** [err]: Replication of an expired key does not delete the expired key in tests/integration/replication-4.tcl Expected '0' to be equal to '1' (context: type eval line 13 cmd {assert_equal 0 [$slave exists k]} proc ::test) ``` This test is very likely to do a false positive if the `wait_for_ofs_sync` takes longer than the expiration time, so give it a few more chances. The test was introduced in #9572. (cherry picked from commit 06b577a)
redis#11548) In replica, the key expired before master's `INCR` was arrived, so INCR creates a new key in the replica and the test failed. ``` *** [err]: Replication of an expired key does not delete the expired key in tests/integration/replication-4.tcl Expected '0' to be equal to '1' (context: type eval line 13 cmd {assert_equal 0 [$slave exists k]} proc ::test) ``` This test is very likely to do a false positive if the `wait_for_ofs_sync` takes longer than the expiration time, so give it a few more chances. The test was introduced in redis#9572.
redis#11548) In replica, the key expired before master's `INCR` was arrived, so INCR creates a new key in the replica and the test failed. ``` *** [err]: Replication of an expired key does not delete the expired key in tests/integration/replication-4.tcl Expected '0' to be equal to '1' (context: type eval line 13 cmd {assert_equal 0 [$slave exists k]} proc ::test) ``` This test is very likely to do a false positive if the `wait_for_ofs_sync` takes longer than the expiration time, so give it a few more chances. The test was introduced in redis#9572.
In replica, the key expired before master's
INCRwas arrived, so INCRcreates a new key in the replica and the test failed.
This test is very likely to do a false positive if the
wait_for_ofs_synctakes longer than the expiration time, so give it a few more chances.
Go with 5 retries of increasing timeout, i.e. start with 500ms, then go
to 1000ms, 2000ms, 4000ms, 8000ms.
The test was introduced in #9572
Also it fixes #11153