kevin-wu24 commented on PR #22111:
URL: https://github.com/apache/kafka/pull/22111#issuecomment-4812531121

   Looks like with the current implementation, there is a certain message 
delivery state that can result in:
   ```
   Caused by: java.lang.IllegalStateException: Expected to be Follower, but the 
current state is UnattachedState(epoch=1, leaderId=OptionalInt[3], 
votedKey=Optional.empty, voters=[0, 1, 2, 3, 4], 
electionTimeoutMs=9223372036854775807, 
highWatermark=Optional[LogOffsetMetadata(offset=12, metadata=Optional.empty)])
        at 
org.apache.kafka.raft.QuorumState.followerStateOrThrow(QuorumState.java:760)
        at 
org.apache.kafka.raft.KafkaRaftClient.handleFetchResponse(KafkaRaftClient.java:1742)
        at 
org.apache.kafka.raft.KafkaRaftClient.handleResponse(KafkaRaftClient.java:2741)
        at 
org.apache.kafka.raft.KafkaRaftClient.handleInboundMessage(KafkaRaftClient.java:2854)
        at 
org.apache.kafka.raft.KafkaRaftClient.lambda$poll$38(KafkaRaftClient.java:3701)
        at java.base/java.util.Optional.ifPresent(Optional.java:178)
        at org.apache.kafka.raft.KafkaRaftClient.poll(KafkaRaftClient.java:3701)
        at 
org.apache.kafka.raft.RaftEventSimulationTest$RaftNode.poll(RaftEventSimulationTest.java:971)
   ```
   Where we aren't calling `transitionToFollower` in `maybeTransition`.


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

Reply via email to