pkuwm commented on a change in pull request #700: Call session aware
createEphemeral to create live instance.
URL: https://github.com/apache/helix/pull/700#discussion_r370282265
##########
File path:
helix-core/src/main/java/org/apache/helix/manager/zk/ParticipantManager.java
##########
@@ -201,7 +201,7 @@ private void createLiveInstance() {
do {
retry = false;
try {
- _zkclient.createEphemeral(liveInstancePath, liveInstance.getRecord());
+ _zkclient.createEphemeral(liveInstancePath, liveInstance.getRecord(),
_sessionId);
Review comment:
Good question.
- The validation is put in `create(path, dataObject, acl, mode,
expectedSessionId)` (which is called by `createEphemeral(path, data, session)`):
https://github.com/apache/helix/blob/662dc0f14ed1db49f2c1a41bf55c7cfcecbc7241/helix-core/src/main/java/org/apache/helix/manager/zk/zookeeper/ZkClient.java#L662-L670
And this is the reason of current PR.
- _sessionId is possibly stale. So we want to fix it in this PR by calling
the new API with session id. The new API does final check and create ephemeral
node.
----------------------------------------------------------------
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]