-
Notifications
You must be signed in to change notification settings - Fork 469
Checking the state of the Node in NotifyLeave #293
Copy link
Copy link
Open
Description
I would like to check whether the service was stopped gracefully in NotifyLeave. The callback accepts a Node with a State field, but it is always equal to StateAlive.
Having looked at the code, I believe that the problem is that the State field is simultaneously declared in both Node and nodeState structs, while Node is nested in nodeState. Could someone explain if there are reasons to do this?
I see several solutions, but unfortunately they are not backwards compatible:
- add a getter and setter for
nodeState, which will also changeNode.State. At the same time, make theStatefield private. - remove
Statefield fromnodeState - remove the
Statefield fromNode, and add a separate parameter with the state toNotifyLeave
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels