Skip to content

Commit

Permalink
tests: check bad_offsets at end of kgo-verifier produce
Browse files Browse the repository at this point in the history
This check acts as a reproducer for redpanda-data#10232
and more generally as a pervasive sanity check of our offset
handling and idempotency.
  • Loading branch information
jcsp committed Apr 26, 2023
1 parent 8cf9760 commit cbf7823
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/rptest/services/kgo_verifier_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,14 @@ def wait_node(self, node, timeout_sec=None):

self._status_thread.raise_on_error()

if self._status.bad_offsets != 0:
# This either means that the test sent multiple producers' traffic to
# the same topic, or that Redpanda showed a buggy behavior with
# idempotency: producer records should always land at the next offset
# after the last record they wrote.
raise RuntimeError(
f"{self.who_am_i()} possible idempotency bug: {self._status}")

return super().wait_node(node, timeout_sec=timeout_sec)

def wait_for_acks(self, count, timeout_sec, backoff_sec):
Expand Down

0 comments on commit cbf7823

Please sign in to comment.