You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 change Node.State. At the same time, make the State field private.
remove State field from nodeState
remove the State field from Node, and add a separate parameter with the state to NotifyLeave
The text was updated successfully, but these errors were encountered:
I would like to check whether the service was stopped gracefully in
NotifyLeave
. The callback accepts aNode
with aState
field, but it is always equal toStateAlive
.Having looked at the code, I believe that the problem is that the
State
field is simultaneously declared in bothNode
andnodeState
structs, whileNode
is nested innodeState
. Could someone explain if there are reasons to do this?I see several solutions, but unfortunately they are not backwards compatible:
nodeState
, which will also changeNode.State
. At the same time, make theState
field private.State
field fromnodeState
State
field fromNode
, and add a separate parameter with the state toNotifyLeave
The text was updated successfully, but these errors were encountered: