Jason Gustafson created KAFKA-13161:
---------------------------------------
Summary: Follower leader and ISR state not updated after partition
change in KRaft
Key: KAFKA-13161
URL: https://issues.apache.org/jira/browse/KAFKA-13161
Project: Kafka
Issue Type: Bug
Reporter: Jason Gustafson
Assignee: Jose Armando Garcia Sancio
Fix For: 3.0.0
In KRaft when we detect a partition change, we first verify whether any leader
or follower transitions are needed. Depending on the case, we call either
`applyLocalLeadersDelta` or `applyLocalFollowersDelta`. In the latter case, we
are missing a call to `Partition.makeFollower` which is responsible for
updating LeaderAndIsr state for the partitions. As a result of this, the
partition state may be left stale.
The specific consequences of this bug are 1) follower fetching fails since the
epoch is never updated, and 2) a stale leader may continue to accept Produce
requests. The latter is the bigger issue since it can lead to log divergence if
we are appending from both the client and from the fetcher thread at the same
time. I tested this locally and confirmed that it is possible.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)