why can't rejoin a leaved node into the cluster
shuff1e opened this issue · 1 comments
shuff1e commented
- the Leave API sets m.leave to 1
func (m *Memberlist) Leave(timeout time.Duration) error {
m.leaveLock.Lock()
defer m.leaveLock.Unlock()
if m.hasShutdown() {
panic("leave after shutdown")
}
if !m.hasLeft() {
atomic.StoreInt32(&m.leave, 1)
- it seems the leaved member doesn't join the cluster after the Join API called , I guess the code, Join -> pushPullNode -> mergeRemoteState -> mergeState -> suspectNode
// Ignore non-alive nodes
if state.State != stateAlive {
return
}
it returns here , results the leaved node can't rejoin, I mean, the leaved node is not on the list which the Members() API returns, because of it's dead state
- I wonder how can I rejoin a node, but I didn't find the code like atomic.StoreInt32(&m.leave, 0)