Skip to content

Commit

Permalink
feat(cluster): Explicitly delete host during the node unregistering
Browse files Browse the repository at this point in the history
  • Loading branch information
hueypark committed Mar 29, 2023
1 parent 9f236d2 commit 797d819
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,5 +339,12 @@ func (n *nodeRegistration) States() node.State {

// Unregister removes node from the cluster's node list, and clears all NodeState.
func (n *nodeRegistration) Unregister() {
_, err := n.cluster.States().Delete(n.ctx, path.Join(nodeNs, n.node.Host))
if err != nil {
log.Warn().
Err(err).
Msg("failed to delete node")
}

n.cancel()
}

0 comments on commit 797d819

Please sign in to comment.