pkuwm commented on a change in pull request #642: Fix zk session race condition
before creating a live instance
URL: https://github.com/apache/helix/pull/642#discussion_r353013298
##########
File path:
helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java
##########
@@ -1162,14 +1167,15 @@ public void handleNewSession() throws Exception {
}
}
- void handleNewSessionAsParticipant() throws Exception {
+ void handleNewSessionAsParticipant(final String sessionId) throws Exception {
if (_participantManager != null) {
_participantManager.reset();
}
_participantManager =
new ParticipantManager(this, _zkclient, _sessionTimeout,
_liveInstanceInfoProvider,
_preConnectCallbacks);
- _participantManager.handleNewSession();
+
+ _participantManager.handleNewSession(sessionId);
Review comment:
The cached _sessionId may change and may be different with the passed in
sessionId.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]