[
https://issues.apache.org/jira/browse/CURATOR-537?focusedWorklogId=751160&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-751160
]
ASF GitHub Bot logged work on CURATOR-537:
------------------------------------------
Author: ASF GitHub Bot
Created on: 31/Mar/22 18:27
Start Date: 31/Mar/22 18:27
Worklog Time Spent: 10m
Work Description: 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]
Issue Time Tracking
-------------------
Worklog Id: (was: 751160)
Time Spent: 40m (was: 0.5h)
> Expose ourPath in LeaderLatch readonly
> --------------------------------------
>
> Key: CURATOR-537
> URL: https://issues.apache.org/jira/browse/CURATOR-537
> Project: Apache Curator
> Issue Type: Improvement
> Components: Recipes
> Affects Versions: 4.2.0
> Reporter: Zili Chen
> Assignee: Jordan Zimmerman
> Priority: Major
> Fix For: 4.3.0
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Follow the discussion in user list
> [here|https://lists.apache.org/x/thread.html/b5cf2ea44fca60362262acfb8b81d02a29b34dc18a57272c2d3e8427@%3Cuser.curator.apache.org%3E]
> we found it is worth a ticket to expose ourPath in LeaderLatch readonly. The
> path of the latch is the natural fencing token for an external leader and
> also the effective checker whether contender is still the leader.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)