soarez commented on code in PR #15136:
URL: https://github.com/apache/kafka/pull/15136#discussion_r1509052378
##########
core/src/main/scala/kafka/server/ReplicaManager.scala:
##########
@@ -2859,10 +2867,10 @@ class ReplicaManager(val config: KafkaConfig,
"local leaders.")
replicaFetcherManager.removeFetcherForPartitions(localLeaders.keySet)
localLeaders.forKeyValue { (tp, info) =>
- getOrCreatePartition(tp, delta, info.topicId).foreach { case (partition,
isNew) =>
+ val partitionAssignedDirectoryId =
directoryIds.find(_._1.topicPartition() == tp).map(_._2)
+ getOrCreatePartition(tp, delta, info.topicId, isLocalFollower = false,
partitionAssignedDirectoryId).foreach { case (partition, isNew) =>
Review Comment:
> `isLocalFollower = false`
I don't think this is ok. Setting this to false disables the fix when the
broker is the leader. Which can happen in RF=1 or with RF=N when the broker
comes back in the ISR (e.g. because there were no new messages, and the other
replicas are all shutdown).
I had a conversation with @gaurav-narula about this, and the plan is to
apply this fix earlier when the logs are being loaded.
--
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]