Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions go/vt/topotools/rebuild_keyspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,11 @@ func RebuildKeyspaceLocked(ctx context.Context, log logutil.Logger, ts *topo.Ser
switch {
case err == nil:
for _, partition := range srvKeyspace.GetPartitions() {
if partition.GetShardTabletControls() != nil {
return fmt.Errorf("can't rebuild serving keyspace while a migration is on going. TabletControls is set for partition %v", partition)
for _, shardTabletControl := range partition.GetShardTabletControls() {
if shardTabletControl.QueryServiceDisabled {
return fmt.Errorf("can't rebuild serving keyspace while a migration is on going. TabletControls is set for partition %v", partition)
}
}

}
case topo.IsErrType(err, topo.NoNode):
// NOOP
Expand Down