tisonkun opened a new pull request #414: URL: https://github.com/apache/curator/pull/414
This is a follow up to #324. ourPath can be modified after it's retrived in checkLeadership and before isLeader saves it by ourPath.get() again - if the connection reset and node be recreated. To avoid handling multiple concurrent cases, this patch simply saves the last node is leader as the localOurPath so that it's always the last valid fencing token - it can be verified as invalid later, but never false valid. Signed-off-by: tison <[email protected]> cc @Randgalt @eolivelli @cammckenzie I'm unsure whether I get the data race possibility right. It seems that ourPath can be false valid only if it's `reset` concurrently. Other ops are synced by the node, but handle state on reconnect can be async. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
