Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/8134 )
Change subject: KUDU-2155: disarm failure detector around elections ...................................................................... Patch Set 3: (1 comment) http://gerrit.cloudera.org:8080/#/c/8134/1//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/8134/1//COMMIT_MSG@20 PS1, Line 20: I'm still not convinced this is the cleanest approach, but it seems to work. > The one-shot guarantees that 'FailureDetected' is called when it's not arme Although we had this discussion a few years ago, I've paged this change back in and have given this problem some more thought. It's pretty difficult to enforce invariants vis a vis FD arming and being mid-election without introducing more state tracking the existence of an election. I'm hesitant to do that because of the complex nature of the election code flow; I'm worried that if I get it wrong, the new tracking would end up hurting more than helping. So instead, I've considered your example and the question you posed at the end: is an armed FD during DoElectionCallback a problem? I don't think it is. EnableFailureDetector() will no-op if the FD is already enabled. And there are existing safeguards in StartElection to prevent running an election if we're already a leader. -- To view, visit http://gerrit.cloudera.org:8080/8134 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Idcd311cee028c48e908f290d60c474e8a4557d97 Gerrit-Change-Number: 8134 Gerrit-PatchSet: 3 Gerrit-Owner: Adar Dembo <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Tidy Bot (241) Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-Comment-Date: Mon, 03 Feb 2020 22:02:29 +0000 Gerrit-HasComments: Yes
