Skip to content

Commit

Permalink
Changes from 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 11, 2024
1 parent 2e654c8 commit e304d3e
Show file tree
Hide file tree
Showing 3 changed files with 6 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 @@ -668,7 +668,7 @@ func areTabletsAvailableToStreamFrom(ctx context.Context, req *vtctldatapb.Workf
}
if req.GetEnableReverseReplication() {
// Ensure the tablet has the minimum privileges required on the sidecar database
// table in order to create the reverse workflow as part of the traffic switch.
// table in order to manage the reverse workflow as part of the traffic switch.
for _, tablet := range tablets {
wg.Add(1)
go func() {
Expand Down
6 changes: 3 additions & 3 deletions go/vt/vttablet/tabletmanager/rpc_vreplication.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ where u.user = %a
or (d.db = %a and u.insert_priv = 'y' and u.update_priv = 'y' and u.delete_priv = 'y')
or (t.db = %a and t.table_name = 'vreplication'
and find_in_set('insert', t.table_priv)
and find_in_set('update', t.table_priv)
and find_in_set('delete', t.table_priv)
and find_in_set('update', t.table_priv)
and find_in_set('delete', t.table_priv)
)
)
`
Expand Down Expand Up @@ -549,7 +549,7 @@ func (tm *TabletManager) UpdateVReplicationWorkflows(ctx context.Context, req *t

// ValidateVReplicationPermissions validates that the --db_filtered_user has
// the minimum permissions required on the sidecardb vreplication table
// needed in order to manager vreplication metatdata.
// needed in order to manager vreplication metadata.
func (tm *TabletManager) ValidateVReplicationPermissions(ctx context.Context, req *tabletmanagerdatapb.ValidateVReplicationPermissionsRequest) (*tabletmanagerdatapb.ValidateVReplicationPermissionsResponse, error) {
query, err := sqlparser.ParseAndBind(sqlValidateVReplicationPermissions,
sqltypes.StringBindVariable(tm.DBConfigs.Filtered.User),
Expand Down
3 changes: 2 additions & 1 deletion proto/tabletmanagerdata.proto
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,8 @@ message ValidateVReplicationPermissionsRequest {
message ValidateVReplicationPermissionsResponse {
// The --db_filtered_user on the tablet.
string user = 1;
// Does the user have the expected full set of global permissions.
// Does the user have the minimum privileges needed to manage
// vreplication metadata.
bool ok = 2;
}

Expand Down

0 comments on commit e304d3e

Please sign in to comment.