From 30b7e2fa24aae9485f1c3d12b8f1db48e8538682 Mon Sep 17 00:00:00 2001 From: Matt Lord Date: Wed, 22 Jan 2025 09:37:11 -0500 Subject: [PATCH] Fixes after merging in origin/main Signed-off-by: Matt Lord --- go/vt/vtctl/workflow/utils.go | 2 +- .../tabletmanager/rpc_vreplication_test.go | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/go/vt/vtctl/workflow/utils.go b/go/vt/vtctl/workflow/utils.go index 593cdeda46f..3c33ef25560 100644 --- a/go/vt/vtctl/workflow/utils.go +++ b/go/vt/vtctl/workflow/utils.go @@ -1055,7 +1055,7 @@ func validateSourceTablesExist(sourceKeyspace string, ksTables, tables []string) // getVindexAndVSchema gets the vindex (from VSchema) and VSchema with the // provided vindex name and keyspace. -func getVindexAndVSchema(ctx context.Context, ts *topo.Server, keyspace string, vindexName string) (*vschemapb.Vindex, *vschemapb.Keyspace, error) { +func getVindexAndVSchema(ctx context.Context, ts *topo.Server, keyspace string, vindexName string) (*vschemapb.Vindex, *topo.KeyspaceVSchemaInfo, error) { vschema, err := ts.GetVSchema(ctx, keyspace) if err != nil { return nil, nil, vterrors.Errorf(vtrpcpb.Code_INTERNAL, "failed to get vschema for the %s keyspace", keyspace) diff --git a/go/vt/vttablet/tabletmanager/rpc_vreplication_test.go b/go/vt/vttablet/tabletmanager/rpc_vreplication_test.go index 723da5143aa..8f4b230104f 100644 --- a/go/vt/vttablet/tabletmanager/rpc_vreplication_test.go +++ b/go/vt/vttablet/tabletmanager/rpc_vreplication_test.go @@ -27,8 +27,6 @@ import ( "testing" "time" - "vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication" - "github.com/stretchr/testify/require" "vitess.io/vitess/go/constants/sidecar" @@ -47,6 +45,7 @@ import ( "vitess.io/vitess/go/vt/vtenv" "vitess.io/vitess/go/vt/vtgate/vindexes" vttablet "vitess.io/vitess/go/vt/vttablet/common" + "vitess.io/vitess/go/vt/vttablet/tabletmanager/vreplication" binlogdatapb "vitess.io/vitess/go/vt/proto/binlogdata" querypb "vitess.io/vitess/go/vt/proto/query" @@ -2420,7 +2419,11 @@ func TestInternalizeLookupVindex(t *testing.T) { for _, tcase := range testcases { t.Run(tcase.request.Name, func(t *testing.T) { // Resave the source schema for every iteration. - err := tenv.ts.SaveVSchema(ctx, tcase.request.Keyspace, sourceVschema) + sourceKsVS := &topo.KeyspaceVSchemaInfo{ + Name: tcase.request.Keyspace, + Keyspace: sourceVschema, + } + err := tenv.ts.SaveVSchema(ctx, sourceKsVS) require.NoError(t, err) err = tenv.ts.RebuildSrvVSchema(ctx, []string{tenv.cells[0]}) require.NoError(t, err) @@ -2671,7 +2674,11 @@ func TestCompleteLookupVindex(t *testing.T) { for _, tcase := range testcases { t.Run(tcase.request.Name, func(t *testing.T) { // Resave the source schema for every iteration. - err := tenv.ts.SaveVSchema(ctx, tcase.request.Keyspace, sourceVschema) + sourceKsVS := &topo.KeyspaceVSchemaInfo{ + Name: tcase.request.Keyspace, + Keyspace: sourceVschema, + } + err := tenv.ts.SaveVSchema(ctx, sourceKsVS) require.NoError(t, err) err = tenv.ts.RebuildSrvVSchema(ctx, []string{tenv.cells[0]}) require.NoError(t, err)