Skip to content

Commit

Permalink
Merge pull request radondb#321 from runkecheng/fix_update_pod_call_logic
Browse files Browse the repository at this point in the history
syncer: Optimize update POD trigger conditions
  • Loading branch information
andyli029 authored Dec 2, 2021
2 parents bd8039d + 3c688f8 commit b478be2
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 b478be2

Please sign in to comment.