From 18d34b02346fd7141f84b9adcba595c7349484d0 Mon Sep 17 00:00:00 2001 From: frouioui Date: Sun, 25 Feb 2024 00:04:09 +0000 Subject: [PATCH 1/2] upgrade vitess dependency to latest Signed-off-by: GitHub --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 242932b9..f96cf710 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( sigs.k8s.io/controller-runtime v0.16.3 sigs.k8s.io/controller-tools v0.11.3 sigs.k8s.io/kustomize v2.0.3+incompatible - vitess.io/vitess v0.10.3-0.20240216180501-54c6dfc05c5c + vitess.io/vitess v0.10.3-0.20240223204815-d8f771c695b5 ) require ( diff --git a/go.sum b/go.sum index 20623862..93427958 100644 --- a/go.sum +++ b/go.sum @@ -817,5 +817,5 @@ sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ih sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= -vitess.io/vitess v0.10.3-0.20240216180501-54c6dfc05c5c h1:4yYHzHcEUIfUlikSaLt+sBZBDyc92qWGgPK2HE32TP4= -vitess.io/vitess v0.10.3-0.20240216180501-54c6dfc05c5c/go.mod h1:IsIXgK8exqVYJoIoAIKG9aW688K8skqzN4wde9zXnZ4= +vitess.io/vitess v0.10.3-0.20240223204815-d8f771c695b5 h1:lAUn/qeJKiLGWhVzFuJsnh0ZzIuSdHxkw63rd/yWa0U= +vitess.io/vitess v0.10.3-0.20240223204815-d8f771c695b5/go.mod h1:IsIXgK8exqVYJoIoAIKG9aW688K8skqzN4wde9zXnZ4= From e75084ce9f644012ec0afd546be8f6a0ce5b2fe4 Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Mon, 26 Feb 2024 20:57:16 -0600 Subject: [PATCH 2/2] update call to PlannedReparentShard Signed-off-by: Florent Poinsard --- pkg/controller/vitessshardreplication/reconcile_drain.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/controller/vitessshardreplication/reconcile_drain.go b/pkg/controller/vitessshardreplication/reconcile_drain.go index 3eca8fd4..4c368b65 100644 --- a/pkg/controller/vitessshardreplication/reconcile_drain.go +++ b/pkg/controller/vitessshardreplication/reconcile_drain.go @@ -28,6 +28,7 @@ import ( topodatapb "vitess.io/vitess/go/vt/proto/topodata" "vitess.io/vitess/go/vt/topo" "vitess.io/vitess/go/vt/topo/topoproto" + "vitess.io/vitess/go/vt/vtctl/reparentutil" "vitess.io/vitess/go/vt/wrangler" corev1 "k8s.io/api/core/v1" @@ -312,7 +313,12 @@ func (r *ReconcileVitessShard) reconcileDrain(ctx context.Context, vts *planetsc if vts.Spec.UsingExternalDatastore() { reparentErr = r.handleExternalReparent(ctx, vts, wr, newPrimary.Alias, shard.PrimaryAlias) } else { - reparentErr = wr.PlannedReparentShard(reparentCtx, keyspaceName, vts.Spec.Name, newPrimary.Alias, nil, plannedReparentTimeout, tolerableReplicationLag) + reparentErr = wr.PlannedReparentShard(reparentCtx, keyspaceName, vts.Spec.Name, reparentutil.PlannedReparentOptions{ + NewPrimaryAlias: newPrimary.Alias, + AvoidPrimaryAlias: nil, + WaitReplicasTimeout: plannedReparentTimeout, + TolerableReplLag: tolerableReplicationLag, + }) } if reparentErr != nil {