> On Jan. 7, 2014, 5:12 p.m., Neha Narkhede wrote: > > In general, does the alternate approach of sending all commands to every > > broker and let the broker ignore a become follower if it is for the same > > leader as the current one? The reason why this would work is because all > > controller-broker communication is synchronous, so even if the same broker > > became leader in quick succession (1->2->1), the follower would see the > > 1->2 transition before seeing the 2->1, so it wouldn't incorrectly ignore a > > become follower request from the same leader.
Sending LeaderAndIsr request to followers on non-leader change has the following risk: since the follower will only increase its HW on the next fetch request after the leader has increased its HW, during this time if a LeaderAndIsr request reached the follower it may truncate the last fetched data since they are not within HW yet. Then if there is a leader change immediately the data will be lost without even notified by the controller. - Guozhang ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/16360/#review31299 ----------------------------------------------------------- On Jan. 16, 2014, 12:43 a.m., Guozhang Wang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/16360/ > ----------------------------------------------------------- > > (Updated Jan. 16, 2014, 12:43 a.m.) > > > Review request for kafka. > > > Bugs: KAFKA-1188 > https://issues.apache.org/jira/browse/KAFKA-1188 > > > Repository: kafka > > > Description > ------- > > KAFKA-1188.v5 > > > Dummy > > > KAFKA-1188.v4 > > > KAFKA-1188.v3 > > > KAFKA-1118.v2 > > > KAFKA-1188.v1 > > > Diffs > ----- > > core/src/main/scala/kafka/cluster/Partition.scala > 1087a2e91c86e36a2494a95913a3ec2daf238287 > core/src/main/scala/kafka/server/ReplicaManager.scala > f9d10d385cee49a1e3be8c82e3ffa22ef87a8fd6 > > Diff: https://reviews.apache.org/r/16360/diff/ > > > Testing > ------- > > > Thanks, > > Guozhang Wang > >