Benjamin Reed commented on ZOOKEEPER-599:

looks good flavio. i'd like to request two changes:
1) can you remove or expand debug message so that they are more informative? 
for example, "if(recvqueue.size() == 0) LOG.debug("Message: " + n.sid);" 
doesn't describe what is going on or why the message is being logged.

2) can we simplify:
+                Random r = new Random();
+                do{
+                    sid = 10000L + ((long) r.nextInt(10000));
+                } while(self.getVotingView().containsKey(sid)
+                        || senderWorkerMap.containsKey(sid));
if we guarantee that followers are non-negative, we could pick negative sids 
for observers, so that we don't have to worry about observers colliding with 
follower sids. it might also help later for debugging.

> Changes to FLE and QuorumCnxManager to support Observers
> --------------------------------------------------------
>                 Key: ZOOKEEPER-599
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-599
>             Project: Zookeeper
>          Issue Type: Improvement
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>             Fix For: 3.3.0
>         Attachments: ZOOKEEPER-599.patch, ZOOKEEPER-599.patch, 
> ZOOKEEPER-599.patch
> Observers currently can only use electionAlg 0, which is not the default, 
> supported leader implementation. This issue will fix it.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

Reply via email to