Skip to content

Commit

Permalink
changing order of recluster and set roster.
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmayja committed Sep 17, 2024
1 parent 811db99 commit 2edb650
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions internal/controller/cluster/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,16 @@ func (r *SingleClusterReconciler) Reconcile() (result ctrl.Result, recErr error)
return reconcile.Result{}, recErr
}

if r.IsReclusterNeeded() {
if err = deployment.InfoRecluster(
r.Log,
r.getClientPolicy(), allHostConns,
); err != nil {
r.Log.Error(err, "Failed to do recluster")
return reconcile.Result{}, err
}
}

if asdbv1.IsClusterSCEnabled(r.aeroCluster) {
if !r.IsStatusEmpty() {
if res := r.waitForClusterStability(policy, allHostConns); !res.IsSuccess {
Expand All @@ -249,16 +259,6 @@ func (r *SingleClusterReconciler) Reconcile() (result ctrl.Result, recErr error)
}
}

if r.IsReclusterNeeded() {
if err = deployment.InfoRecluster(
r.Log,
r.getClientPolicy(), allHostConns,
); err != nil {
r.Log.Error(err, "Failed to do recluster")
return reconcile.Result{}, err
}
}

// Update the AerospikeCluster status.
if err = r.updateStatus(); err != nil {
r.Log.Error(err, "Failed to update AerospikeCluster status")
Expand Down

0 comments on commit 2edb650

Please sign in to comment.