Skip to content

Commit

Permalink
Minor changes on self review
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <[email protected]>
  • Loading branch information
mattlord committed Sep 16, 2024
1 parent 30807f0 commit 25ec9f8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions go/test/endtoend/vreplication/vreplication_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ func shardCustomer(t *testing.T, testReverse bool, cells []*Cell, sourceCellOrAl
commit, _ = vc.startQuery(t, openTxQuery)
}
switchWritesDryRun(t, workflowType, ksWorkflow, dryRunResultsSwitchWritesCustomerShard)
var shardNames []string
shardNames := make([]string, 0, len(vc.Cells[defaultCell.Name].Keyspaces[sourceKs].Shards))
for shardName := range maps.Keys(vc.Cells[defaultCell.Name].Keyspaces[sourceKs].Shards) {
shardNames = append(shardNames, shardName)
}
Expand Down Expand Up @@ -1613,7 +1613,7 @@ func testSwitchTrafficPermissionChecks(t *testing.T, workflowType, sourceKeyspac
}

defer func() {
// Put global privs back in place.
// Put the default global privs back in place.
applyPrivileges("grant select,insert,update,delete on *.* to vt_filtered@localhost")
}()

Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtctl/workflow/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -4330,7 +4330,7 @@ func (s *Server) validatePrimaryTabletsHaveRequiredVReplicationPermissions(ctx c
defer wg.Done()
tablet, err := s.ts.GetTablet(ctx, primary)
if err != nil {
allErrors.RecordError(vterrors.Wrapf(err, "failed to get primary tablet for %s/%s shard", keyspace, shard.ShardName()))
allErrors.RecordError(vterrors.Wrapf(err, "failed to get primary tablet for the %s/%s shard", keyspace, shard.ShardName()))
}
// Ensure the tablet has the minimum privileges required on the sidecar database
// table in order to manage the workflow.
Expand Down
3 changes: 2 additions & 1 deletion go/vt/vttablet/tabletmanager/rpc_vreplication.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ where u.user = %a
and find_in_set('update', t.table_priv)
and find_in_set('delete', t.table_priv)
)
) limit 1
)
limit 1
`
)

Expand Down

0 comments on commit 25ec9f8

Please sign in to comment.