Skip to content

Commit

Permalink
Match shard names instead so as to e.g. support "0"
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 27, 2024
1 parent b802c14 commit 747d454
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions go/vt/vtctl/workflow/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1927,9 +1927,9 @@ func (s *Server) VDiffResume(ctx context.Context, req *vtctldatapb.VDiffResumeRe
}

if len(targetShards) > 0 {
for k, target := range ts.targets {
if !slices.Contains(targetShards, key.KeyRangeString(target.GetShard().GetKeyRange())) {
delete(ts.targets, k)
for key, target := range ts.targets {
if !slices.Contains(targetShards, target.GetShard().ShardName()) {
delete(ts.targets, key)
}
}
}
Expand Down Expand Up @@ -2012,9 +2012,9 @@ func (s *Server) VDiffStop(ctx context.Context, req *vtctldatapb.VDiffStopReques
}

if len(targetShards) > 0 {
for k, target := range ts.targets {
if !slices.Contains(targetShards, key.KeyRangeString(target.GetShard().GetKeyRange())) {
delete(ts.targets, k)
for key, target := range ts.targets {
if !slices.Contains(targetShards, target.GetShard().ShardName()) {
delete(ts.targets, key)
}
}
}
Expand Down

0 comments on commit 747d454

Please sign in to comment.