kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neha Narkhede" <neha.narkh...@gmail.com>
Subject Review Request 14865: Patch for KAFKA-1097
Date Wed, 23 Oct 2013 04:34:24 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14865/
-----------------------------------------------------------

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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message