Skip to content

Commit

Permalink
Improve errors
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <[email protected]>
  • Loading branch information
mattlord committed Sep 29, 2024
1 parent 33b4cc9 commit 1c85d2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions go/cmd/vtctldclient/command/vreplication/movetables/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ var (
return fmt.Errorf("invalid value provided for --strip-sharded-auto-increment, valid values are: %s", stripShardedAutoIncOptions)
}
createOptions.WorkflowOptions.StripShardedAutoIncrement = vtctldatapb.ShardedAutoIncrementHandling(val)
if val == int32(vtctldatapb.ShardedAutoIncrementHandling_REPLACE) && createOptions.WorkflowOptions.GlobalKeyspace == "" {
fmt.Println("WARNING: no global-keyspace value provided so all sequence tables must be created manually before switching traffic")
}

return nil
},
Expand Down
3 changes: 2 additions & 1 deletion go/vt/vtctl/workflow/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ func validateNewWorkflow(ctx context.Context, ts *topo.Server, tmc tmclient.Tabl
}
for _, wf := range res.Workflows {
if wf.Workflow == workflow {
allErrors.RecordError(fmt.Errorf("workflow %s already exists in keyspace %s on tablet %v", workflow, keyspace, primary.Alias))
allErrors.RecordError(fmt.Errorf("workflow %s already exists in keyspace %s on tablet %s",
workflow, keyspace, topoproto.TabletAliasString(primary.Alias)))
return
}
}
Expand Down

0 comments on commit 1c85d2a

Please sign in to comment.