You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2021/03/09 12:34:59 UTC

[GitHub] [zookeeper] symat opened a new pull request #1631: ZOOKEEPER-4220: Potential redundant connection attempts during leader election - branch-3.5

symat opened a new pull request #1631:
URL: https://github.com/apache/zookeeper/pull/1631


   We have a logic in the server code, that would try to connect to an other quorum member, based
   on its server ID. We identify the address assigned to this ID first based on the last committed
   quorum configuration. If the connection attempt fails (or the server is not known in the
   committed configuration) then we try to find the address based on the last proposed quorum
   configuration. But we should do the second connection attempt, only if the address in the
   last proposed configuration differs from the address in the last committed configuration.
   Otherwise we would just retry to connect to the same address that failed just right before.
   
   In the current code we have a bug, because we compare the address object references (use "!=")
   instead of comparing the objects themselves (using "not equals"). In certain edge cases (e.g.
   when the last proposed and last committed addresses are the same, but the address is unreachable)
   this bug can lead to unnecessary retry of connection attempts. The normal behaviour would be to
   mark this connection attempt to be failed and wait for e.g. the next election round or wait for
   the other server to come online and initiate a connection to us.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zookeeper] symat commented on pull request #1631: ZOOKEEPER-4220: Potential redundant connection attempts during leader election - branch-3.5

Posted by GitBox <gi...@apache.org>.
symat commented on pull request #1631:
URL: https://github.com/apache/zookeeper/pull/1631#issuecomment-794166171


   I'll go ahead and merge this, as the original PR #1615 for 3.7.0 was already reviewed by @anmolnar and @ztzg 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zookeeper] symat edited a comment on pull request #1631: ZOOKEEPER-4220: Potential redundant connection attempts during leader election - branch-3.5

Posted by GitBox <gi...@apache.org>.
symat edited a comment on pull request #1631:
URL: https://github.com/apache/zookeeper/pull/1631#issuecomment-794166171


   CI is green, I'll go ahead and merge this, as the original PR #1615 for 3.7.0 was already reviewed by @anmolnar and @ztzg 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zookeeper] symat closed pull request #1631: ZOOKEEPER-4220: Potential redundant connection attempts during leader election - branch-3.5

Posted by GitBox <gi...@apache.org>.
symat closed pull request #1631:
URL: https://github.com/apache/zookeeper/pull/1631


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zookeeper] ztzg commented on pull request #1631: ZOOKEEPER-4220: Potential redundant connection attempts during leader election - branch-3.5

Posted by GitBox <gi...@apache.org>.
ztzg commented on pull request #1631:
URL: https://github.com/apache/zookeeper/pull/1631#issuecomment-794355248


   Thank you for taking care of it, @symat!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zookeeper] symat commented on pull request #1631: ZOOKEEPER-4220: Potential redundant connection attempts during leader election - branch-3.5

Posted by GitBox <gi...@apache.org>.
symat commented on pull request #1631:
URL: https://github.com/apache/zookeeper/pull/1631#issuecomment-793822001


   created this PR to kick-in CI on branch 3.5 for #1615


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org