Skip to content

Commit b8cb91a

Browse files
authored
Merge pull request #321 from runkecheng/fix_update_pod_call_logic
syncer: Optimize update POD trigger conditions
2 parents 10f08ce + c6980cb commit b8cb91a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mysqlcluster/syncer/statefulset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ func (s *StatefulSetSyncer) createOrUpdate(ctx context.Context) (controllerutil.
289289
// updatePod update the pods, update follower nodes first.
290290
// This can reduce the number of master-slave switching during the update process.
291291
func (s *StatefulSetSyncer) updatePod(ctx context.Context) error {
292-
if s.sfs.Status.UpdatedReplicas >= s.sfs.Status.Replicas {
292+
if s.sfs.Status.UpdateRevision == s.sfs.Status.CurrentRevision {
293293
return nil
294294
}
295295

0 commit comments

Comments
 (0)