----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/14865/#review27433 -----------------------------------------------------------
core/src/main/scala/kafka/cluster/Partition.scala <https://reviews.apache.org/r/14865/#comment53312> Previously we do not update assignedReplicas map upon receiving the LeaderAndISR request, was that OK? core/src/main/scala/kafka/controller/ReplicaStateMachine.scala <https://reviews.apache.org/r/14865/#comment53313> The changes in logic of expanding ISR should have already solved the problem. Do we need to do this here? core/src/main/scala/kafka/controller/ReplicaStateMachine.scala <https://reviews.apache.org/r/14865/#comment53314> Ditto as above. kafka-patch-review.py <https://reviews.apache.org/r/14865/#comment53311> Should this be included in this RB? - Guozhang Wang On Oct. 23, 2013, 4:34 a.m., Neha Narkhede wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/14865/ > ----------------------------------------------------------- > > (Updated Oct. 23, 2013, 4:34 a.m.) > > > Review request for kafka. > > > Bugs: KAFKA-1097 > https://issues.apache.org/jira/browse/KAFKA-1097 > > > Repository: kafka > > > Description > ------- > > KAFKA-1097 Race condition while reassigning low throughput partition leads to > incorrect ISR information in zookeeper; The changes include 1) Adding the ISR > shrink logic as part of the OfflineReplica -> NonExistentReplica state change > 2) Adding a safety check on the broker where it only expands the ISR if the > replica is in the assigned replica list 3) Updating the assigned replica list > on the broker on every makeLeader request and also on makeFollower request > for safety, though that's not strictly required. These changes will ensure > that the ISR is shrunk by the controller and the leader has an updated > assigned replica list. So even if a replica sends a fetch request after the > ISR is shrunk by the controller, the broker will not be able to update the > ISR until it receives the next LeaderAndIsrRequest (which notifies it of the > latest zkVersion of the partition state path) that also contains the shrunk > ISR and assigned replica list. Using that the broker will avoid expanding the > ISR i f the replica is not present in the new assigned replica list > > > Diffs > ----- > > core/src/main/scala/kafka/cluster/Partition.scala > 60f3ed4e88b08d0dcf2ea84259ae6dbe9d7c3a2d > core/src/main/scala/kafka/controller/KafkaController.scala > 88d130f55997b72a8590e4cfe92857a7320e70d5 > core/src/main/scala/kafka/controller/ReplicaStateMachine.scala > 212c05d65dcdc147e55f90875bacc940e30342bf > core/src/main/scala/kafka/server/ReplicaManager.scala > 03ba60e82cdb3dce100603d615894ede47e4b077 > kafka-patch-review.py 82ea9a890fe79aad7d0ea6d33f3e2780e036317c > > Diff: https://reviews.apache.org/r/14865/diff/ > > > Testing > ------- > > > Thanks, > > Neha Narkhede > >