Skip to content

Commit

Permalink
Merge pull request #534 from planetscale/create-pull-request/patch
Browse files Browse the repository at this point in the history
Upgrade Vitess Dependency to Latest
  • Loading branch information
GuptaManan100 authored Feb 27, 2024
2 parents df52a75 + e75084c commit 4bbbacf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
8 changes: 7 additions & 1 deletion pkg/controller/vitessshardreplication/reconcile_drain.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 4bbbacf

Please sign in to comment.