-
Notifications
You must be signed in to change notification settings - Fork 651
ducktape: fix bad test case with acks=1 #26878
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
Conversation
106093d
to
01b5c96
Compare
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
CI test resultstest results on build#69205
test results on build#69384
|
@@ -88,7 +88,7 @@ def test_consumer_interruption(self): | |||
@parametrize(write_caching=True, disable_batch_cache=False) | |||
@parametrize(write_caching=True, disable_batch_cache=True) | |||
@parametrize(write_caching=False) | |||
def test_relaxed_acks(self, write_caching, disable_batch_cache=False): | |||
def test_acks(self, write_caching, disable_batch_cache=False): |
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.
can we keep the test but just change the validation, it is important to test redpanda with relaxed acks, with this change we are loosing coverage
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.
Yes, I can do that. Is it important to set write_caching=false
with relaxed acks, as this test does? Should we test relaxed acks with write caching on and off?
`test_relaxed_acks` had one parameterization running with `acks=1`, but it expected that the consumer would see exactly the set of offsets that were acked to the producers, even with injected node failures. This is not always the case: 1. If the leader acks a message but doesn't have time to replicate it before failing, and a new leader is elected while the original leader is down, the original leader will truncate the acked message from its log and no consumer will see it. 2. If the leader acks a message but doesn't have time to replicate or flush it to disk before failing, and the leader is reelected when it restarts, it may lose the message and no consumer will see it. Situation 2 was recently seen in CI. This change removes the `acks=1` case and renames the test, because it's no longer testing relaxed acks, just default `acks=-1`, with different levels of caching enabled.
01b5c96
to
0e8ec1d
Compare
Force-push to address Michal's feedback: keep the test case, just relax the validation when |
test_relaxed_acks
had one parameterization running withacks=1
, but it expected that the consumer would see exactly the set of offsets that were acked to the producers, even with injected node failures. This is not always the case:Situation 2 was recently seen in CI.
This change adjust validation to allow for messages to go missing when
acks=1
.Fixes CORE-12793
Backports Required
Release Notes