You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "Enrico Olivelli (Jira)" <ji...@apache.org> on 2019/09/06 15:43:11 UTC
[jira] [Updated] (ZOOKEEPER-991) QuoromPeer.OBSERVER_ID
[ https://issues.apache.org/jira/browse/ZOOKEEPER-991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Enrico Olivelli updated ZOOKEEPER-991:
--------------------------------------
Fix Version/s: 3.5.7
> QuoromPeer.OBSERVER_ID
> ----------------------
>
> Key: ZOOKEEPER-991
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-991
> Project: ZooKeeper
> Issue Type: Bug
> Components: quorum
> Affects Versions: 3.3.2
> Environment: Windows
> Reporter: Sandeep Maheshwari
> Priority: Major
> Fix For: 3.6.0, 3.5.6, 3.5.7
>
>
> I don't understand why do we even need this code at first place.
> if (remoteSid == QuorumPeer.OBSERVER_ID) {
> /*
> * Choose identifier at random. We need a value to identify
> * the connection.
> */
> remoteSid = observerCounter--;
> initializeMessageQueue(remoteSid);
> LOG.info("Setting arbitrary identifier to observer: " + remoteSid);
> }
> Even if remove above code from public Long readRemoteServerID(Socket sock) {} function the FLE will work correctly. Because when any other peer(PARTICIPANT) receive a notification from the observer, that peer won't consider his(observer) vote because of this check
> if(!self.getVotingView().containsKey(response.sid))
> Hence there is no need of that code. Also bcoz to above code there is a possibility of creating redundant threads (SendWorker-ReceiveWorker) bcoz when same participant try to initiate connection with same peer we are doing (sid = observerCounter--;). So the same observer getting different sid and hence corresponding thread would be crated which will be of no use.
> Please let me know if i am correct.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)