Skip to content

Conversation

@enjoy-binbin
Copy link
Contributor

@enjoy-binbin enjoy-binbin commented Nov 27, 2022

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

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.
@enjoy-binbin
Copy link
Contributor Author

First reported at #9572 (review)

@zuiderkwast
Copy link
Contributor

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?

@enjoy-binbin
Copy link
Contributor Author

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

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.

LGTM

@zuiderkwast zuiderkwast requested a review from oranagra November 28, 2022 10:09
@oranagra
Copy link
Member

thank you for taking care of this.
i also saw it and reached the same conclusion regarding the failure reason, but decide to just ignore that rare failure.

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.
i.e. start with 500ms, then go to 1000, 2000, 4000, 8000

@oranagra oranagra merged commit 06b577a into redis:unstable Nov 28, 2022
@enjoy-binbin enjoy-binbin deleted the few_more_chances_for_expire_test branch November 28, 2022 11:05
oranagra pushed a commit that referenced this pull request Dec 12, 2022
#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)
madolson pushed a commit to madolson/redis that referenced this pull request Apr 19, 2023
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.
enjoy-binbin added a commit to enjoy-binbin/redis that referenced this pull request Jul 31, 2023
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Multiple errors running make test

3 participants