[jira] [Commented] (ZOOKEEPER-1790) Deal with special ObserverId in QuorumCnxManager.receiveConnection
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13812078#comment-13812078 ] Alexander Shraer commented on ZOOKEEPER-1790: - The problem described in this JIRA turned out not be a problem as I mention in the first comment. [~thawan], I'm actually not sure if -1 would work or not - there aren't any tests for this in 3.4 or 3.5. I can't think of anything specific that changed that would prevent it from working, but I may be wrong. As you pointed out you wouldn't be able to dynamically change the parameters of such observers. > Deal with special ObserverId in QuorumCnxManager.receiveConnection > -- > > Key: ZOOKEEPER-1790 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1790 > Project: ZooKeeper > Issue Type: Bug > Components: server >Affects Versions: 3.4.6, 3.5.0 >Reporter: Alexander Shraer >Assignee: Alexander Shraer > Fix For: 3.4.6, 3.5.0 > > > QuorumCnxManager.receiveConnection assumes that a negative sid means that > this is a 3.5.0 server, which has a different communication protocol. This > doesn't account for the fact that ObserverId = -1 is a special id that may be > used by observers and is also negative. > This requires a fix to trunk and a separate fix to 3.4 branch, where this > function is different (see ZOOKEEPER-1633) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (ZOOKEEPER-1790) Deal with special ObserverId in QuorumCnxManager.receiveConnection
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13811852#comment-13811852 ] Raul Gutierrez Segales commented on ZOOKEEPER-1790: --- [~fpj]: I don't think it's related - my initial assessment was wrong. It isn't connection attempts that generate the extra traffic I am seeing but the Notifications (as commented in ZOOKEEPER-1807). > Deal with special ObserverId in QuorumCnxManager.receiveConnection > -- > > Key: ZOOKEEPER-1790 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1790 > Project: ZooKeeper > Issue Type: Bug > Components: server >Affects Versions: 3.4.6, 3.5.0 >Reporter: Alexander Shraer >Assignee: Alexander Shraer > Fix For: 3.4.6, 3.5.0 > > > QuorumCnxManager.receiveConnection assumes that a negative sid means that > this is a 3.5.0 server, which has a different communication protocol. This > doesn't account for the fact that ObserverId = -1 is a special id that may be > used by observers and is also negative. > This requires a fix to trunk and a separate fix to 3.4 branch, where this > function is different (see ZOOKEEPER-1633) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (ZOOKEEPER-1790) Deal with special ObserverId in QuorumCnxManager.receiveConnection
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13811839#comment-13811839 ] Flavio Junqueira commented on ZOOKEEPER-1790: - I was wondering if this has anything to do with ZOOKEEPER-1807. > Deal with special ObserverId in QuorumCnxManager.receiveConnection > -- > > Key: ZOOKEEPER-1790 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1790 > Project: ZooKeeper > Issue Type: Bug > Components: server >Affects Versions: 3.4.6, 3.5.0 >Reporter: Alexander Shraer >Assignee: Alexander Shraer > Fix For: 3.4.6, 3.5.0 > > > QuorumCnxManager.receiveConnection assumes that a negative sid means that > this is a 3.5.0 server, which has a different communication protocol. This > doesn't account for the fact that ObserverId = -1 is a special id that may be > used by observers and is also negative. > This requires a fix to trunk and a separate fix to 3.4 branch, where this > function is different (see ZOOKEEPER-1633) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (ZOOKEEPER-1790) Deal with special ObserverId in QuorumCnxManager.receiveConnection
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13811837#comment-13811837 ] Thawan Kooburat commented on ZOOKEEPER-1790: In our internal deployment, we use negative sid to for observers (actually all of them is -1) . This is probably not the intended usage but it worked so far. It would be nice to add to release note of 3.5 if there is a change in the valid sid range. > Deal with special ObserverId in QuorumCnxManager.receiveConnection > -- > > Key: ZOOKEEPER-1790 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1790 > Project: ZooKeeper > Issue Type: Bug > Components: server >Affects Versions: 3.4.6, 3.5.0 >Reporter: Alexander Shraer >Assignee: Alexander Shraer > Fix For: 3.4.6, 3.5.0 > > > QuorumCnxManager.receiveConnection assumes that a negative sid means that > this is a 3.5.0 server, which has a different communication protocol. This > doesn't account for the fact that ObserverId = -1 is a special id that may be > used by observers and is also negative. > This requires a fix to trunk and a separate fix to 3.4 branch, where this > function is different (see ZOOKEEPER-1633) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (ZOOKEEPER-1790) Deal with special ObserverId in QuorumCnxManager.receiveConnection
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13793577#comment-13793577 ] Alexander Shraer commented on ZOOKEEPER-1790: - I misunderstood the code - there may not be a problem after all. if (sid == QuorumPeer.OBSERVER_ID) { /* * Choose identifier at random. We need a value to identify * the connection. */ sid = observerCounter--; Where OBSERVER_ID = Long.MAX_VALUE and observerCounter is initially -1. So seems that the first thing being sent is a positive number, whereas the newly introduced protocol numbers are negative, so everything seems ok. Frankly I don't fully understand how these type of observers are connecting. I don't see any tests or any other code besides above using OBSERVER_ID. Closing this for now, if anyone sees a problem please reopen. > Deal with special ObserverId in QuorumCnxManager.receiveConnection > -- > > Key: ZOOKEEPER-1790 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1790 > Project: ZooKeeper > Issue Type: Bug > Components: server >Affects Versions: 3.4.6, 3.5.0 >Reporter: Alexander Shraer >Assignee: Alexander Shraer > Fix For: 3.4.6, 3.5.0 > > > QuorumCnxManager.receiveConnection assumes that a negative sid means that > this is a 3.5.0 server, which has a different communication protocol. This > doesn't account for the fact that ObserverId = -1 is a special id that may be > used by observers and is also negative. > This requires a fix to trunk and a separate fix to 3.4 branch, where this > function is different (see ZOOKEEPER-1633) -- This message was sent by Atlassian JIRA (v6.1#6144)