Skip to content

Commit

Permalink
status: Fix:Nodes.Conitions contains nodes that do not exist in clust…
Browse files Browse the repository at this point in the history
…er after scale in. radondb#283
  • Loading branch information
runkecheng committed Nov 4, 2021
1 parent 52b0987 commit 5513969
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mysqlcluster/syncer/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ func (s *StatusSyncer) updateNodeStatus(ctx context.Context, cli client.Client,
}
}

// Delete node status of nodes that have been deleted.
if len(s.Status.Nodes) > len(pods) {
s.Status.Nodes = s.Status.Nodes[:len(pods)]
}
return nil
}

Expand Down

0 comments on commit 5513969

Please sign in to comment.