Skip to content

Conversation

@corhere
Copy link

@corhere corhere commented Apr 16, 2025

The node State was exported to the application in #223, but only the MergeDelegate is passed Node values with the State field initialized. The actual state of each node as tracked by the local memberlist is hidden from the application in the non-exported nodeState struct which embeds Node. Remove the State field from nodeState so that the State field on the embedded Node is instead used to track the node state. This has the effect of making the actual state of the node (Left vs. Dead) available to NotifyLeave callbacks as a pointer to the nodeState's embedded Node struct is passed to EventDelegate callbacks.

The node State was exported to the application in commit
1c2989e, but only the MergeDelegate is
passed Node values with the State field initialized. The actual state of
each node as tracked by the local memberlist is hidden from the
application in the non-exported nodeState struct which embeds Node.
Remove the State field from nodeState so that the State field on the
embedded Node is instead used to track the node state. This has the
effect of making the actual state of the node (Left vs. Dead) available
to NotifyLeave callbacks as a pointer to the nodeState's embedded Node
struct is passed to EventDelegate callbacks.
@corhere corhere requested a review from a team as a code owner April 16, 2025 20:56
@hashicorp-cla-app
Copy link

hashicorp-cla-app bot commented Apr 16, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Checking the state of the Node in NotifyLeave Feature request: Update state of node in memberlist

1 participant