Skip to content

Commit

Permalink
update func GetBackupCandidates
Browse files Browse the repository at this point in the history
Signed-off-by: Jun Wang <[email protected]>
  • Loading branch information
Jun Wang committed Nov 28, 2023
1 parent 94b9d21 commit d846316
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions go/vt/vtctl/reparentutil/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,13 +349,13 @@ func GetBackupCandidates(tablets []*topo.TabletInfo, stats []*replicationdatapb.
for i, stat := range stats {
// Always include TabletType_PRIMARY
if tablets[i].Type == topodatapb.TabletType_PRIMARY {
res = append(tablets, tablets[i])
res = append(res, tablets[i])
continue
}
// shardTablets[i] and stats[i] is 1:1 mapping
// Healthy shardTablets[i] will be added to tablets
if stat != nil {
res = append(tablets, tablets[i])
res = append(res, tablets[i])
}
}
return res
Expand Down

0 comments on commit d846316

Please sign in to comment.