Skip to content

Commit

Permalink
Fixes after merging in origin/main
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <[email protected]>
  • Loading branch information
mattlord committed Jan 22, 2025
1 parent 0a59270 commit 30b7e2f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go/vt/vtctl/workflow/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
15 changes: 11 additions & 4 deletions go/vt/vttablet/tabletmanager/rpc_vreplication_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 30b7e2f

Please sign in to comment.