Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Kafka >> mail # dev >> Review Request 23474: Patch for KAFKA-1483


Copy link to this message
-
Re: Review Request 23474: Patch for KAFKA-1483

It might increase lock contention but writes to change the leadership occurs not so frequently so using readLock wouldn't be much of an issue I think. I also considered comparing ReplicaManager.localBrokerId with Partition.leaderReplicaIdOpt without a lock this will present an issue where the leader is changed and we might be comparing against old leader value.
Instead of using leaderReplicaIfLocal I can create another method "checkLeader" in Partition which will return a boolean after obtaining a readLock on leaderIsrUpdateLock. Right now there is unnecessary call going to getReplica.
- Sriharsha
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23474/#review47785
On July 15, 2014, 1:18 a.m., Sriharsha Chintalapani wrote: