apalan60 commented on code in PR #20772:
URL: https://github.com/apache/kafka/pull/20772#discussion_r2478284545
##########
tests/kafkatest/services/verifiable_consumer.py:
##########
@@ -53,11 +54,13 @@ def __init__(self, node, verify_offsets, idx,
state=ConsumerState.Dead,
self.position = position if position is not None else {}
self.committed = committed if committed is not None else {}
self.total_consumed = total_consumed
+ self.shutdown_complete = shutdown_complete
Review Comment:
`ConsumerEventHandler` instantiates every consumer in `ConsumerState.Dead`.
During the test, we sometimes read that state before the background thread
emits `startup_complete`, so
the test concluded “this node started and then shut down” even though it
never left the default state.
We now keep an explicit `shutdown_complete` flag so the fencing test only
proceeds once each conflicting consumer has actually gone through the
start→shutdown sequence.
```mermaid
stateDiagram-v2
[*] --> Dead : Init (default)
Dead --> Started : startup_complete
Started --> Dead : shutdown_complete(flag = true)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]