Skip to content

Commit

Permalink
syncer: Use the revision to determine if the POD needs to be updated. r…
Browse files Browse the repository at this point in the history
  • Loading branch information
runkecheng committed Nov 30, 2021
1 parent b7edd45 commit 3c688f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mysqlcluster/syncer/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func (s *StatefulSetSyncer) createOrUpdate(ctx context.Context) (controllerutil.
// updatePod update the pods, update follower nodes first.
// This can reduce the number of master-slave switching during the update process.
func (s *StatefulSetSyncer) updatePod(ctx context.Context) error {
if s.sfs.Status.UpdatedReplicas >= s.sfs.Status.Replicas {
if s.sfs.Status.UpdateRevision == s.sfs.Status.CurrentRevision {
return nil
}

Expand Down

0 comments on commit 3c688f8

Please sign in to comment.