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 <mattalord@gmail.com>
  • Loading branch information
mattlord committed Aug 29, 2024
1 parent e8978f5 commit 18e275c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go/cmd/vtctldclient/command/vreplication/vdiff/vdiff.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ func buildSingleSummary(keyspace, workflow, uuid string, resp *vtctldatapb.VDiff
// Table summary information that must be accounted for across all shards.
{
table := row.AsString("table_name", "")
if table == "" { // This occurs when a the table has yet to be diffed on 1 or more shards
if table == "" { // This occurs when the table diff has not started on 1 or more shards
continue
}
// Create the global VDiff table summary object if it doesn't exist.
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtctl/workflow/framework_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ type testTMClient struct {
reverse atomic.Bool // Are we reversing traffic?
frozen atomic.Bool // Are the workflows frozen?

// Can be set to return an error if an unexpected request is made or
// Can be used to return an error if an unexpected request is made or
// an expected request is NOT made.
strict bool
}
Expand Down
9 changes: 5 additions & 4 deletions go/vt/vtctl/workflow/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -968,10 +968,11 @@ func defaultErrorHandler(logger logutil.Logger, message string, err error) (*[]s
return nil, werr
}

// applyTargetShards applies the targetShards, coming from a command, to the trafficSwitcher.
// It will return an error if the targetShards list contains a shard that does not exist in
// the target keyspace.
// It will then remove any target shards from the trafficSwitcher that are not in the
// applyTargetShards applies the targetShards, coming from a command, to the trafficSwitcher's
// migration targets.
// It will return an error if the targetShards list contains a shard that is not a valid shard
// for the workflow.
// It will then remove any migration targets from the trafficSwitcher that are not in the
// targetShards list.
func applyTargetShards(ts *trafficSwitcher, targetShards []string) error {
if ts == nil {
Expand Down

0 comments on commit 18e275c

Please sign in to comment.