-
Notifications
You must be signed in to change notification settings - Fork 662
rptest
: assert !_stopped
in KgoVerifierServices::wait()
implementations
#27298
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
base: dev
Are you sure you want to change the base?
Conversation
Retry command for Build#71026please wait until all jobs are finished before running the slash command
|
f60591c
to
9c60273
Compare
Retry command for Build#71031please wait until all jobs are finished before running the slash command
|
`KgoVerifierService` objects should be waited upon and then stopped, not the other way around.
9c60273
to
5baac73
Compare
rptest
: catch bad testsrptest
: assert !_stopped
in KgoVerifierServices::wait()
implementations
Retry command for Build#71034please wait until all jobs are finished before running the slash command
|
CI test resultstest results on build#71034
test results on build#71074
test results on build#71084
test results on build#71154
test results on build#71191
test results on build#71239
test results on build#71250
|
5baac73
to
58a8d45
Compare
58a8d45
to
50613bd
Compare
50613bd
to
422a64b
Compare
/ci-repeat 1 |
/ci-repeat 1 |
/ci-repeat 1 |
/ci-repeat 1 |
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.
mostly questions about dead code; the assert is useful to prevent incorrect use/assumptions
f"Can't wait {self.who_am_i()}. It was already stopped." | ||
f" You can either stop() a service or wait() and then stop() it" | ||
f" but not the other way around.") | ||
assert not self._stopped, f"Can't wait {self.who_am_i()}. It was already stopped. You can either stop() a service or wait() and then stop() it but not the other way around." |
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 probably contribute this to ducktape itself
@@ -100,6 +105,7 @@ def test_moving_single_partition_under_load(self, replication_factor): | |||
self._do_move_and_verify(t, partition, 600) | |||
|
|||
self.verify(topic.name) | |||
self.cleanup() |
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.
verify already called wait(). cleanup is not necessarily needed then, right?
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.
Removed
def verify(self, topic_name, msg_size, consumers): | ||
self.producer.wait() | ||
|
||
# Await the consumer that is reading only the subset of data that | ||
# was written before it started. | ||
self.consumer.wait() | ||
self.consumer.stop() |
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.
this should be a noop, right? wait encapsulates a stop
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.
Removed
@@ -169,3 +174,4 @@ def test_io_stress(self, cloud_storage_type, segment_size, | |||
self._create_initial_topics() | |||
|
|||
self._workload(segment_size, interval_uploads) | |||
self.cleanup() |
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.
ditto: why do we need this? it is all dead code to me
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.
Removed
422a64b
to
d955baa
Compare
Retry command for Build#71154please wait until all jobs are finished before running the slash command
|
d955baa
to
db0b138
Compare
Rebased |
@@ -490,7 +492,6 @@ def calculate_total_learners_gap() -> int | None: | |||
|
|||
self.logger.info(f"decommissioning node: {to_decommission_id}", ) | |||
self._decommission(to_decommission_id) | |||
self.producer.wait() |
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.
why is wait removed from there? this changes what the test does no? previously the test waited for consumer to finish before proceeding. but now?
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.
Oops. reverted.
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.
assert not self._stopped, f"Can't wait {self.who_am_i()}. It was already stopped. You can either stop() a service or wait() and then stop() it but not the other way around." AssertionError: Can't wait KgoVerifierProducer-0-140548171042240. It was already stopped. You can either stop() a service or wait() and then stop() it but not the other way around.
Oh, that's why I removed it.
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.
The second producer.wait()
call in verify()
will fail with the new assert if this wait()
is left here.
It is also unnecessary for the test as written.
db0b138
to
eb3daa3
Compare
Retry command for Build#71239please wait until all jobs are finished before running the slash command
|
The second `producer.wait()` call in `verify()` will fail with the new assert if this `wait()` is left here. It is also unnecessary for the test as written.
KgoVerifierService
objects should be waited upon and then stopped, not the other way around.Backports Required
Release Notes