Skip to content

Commit

Permalink
cli: handle merged range descriptors in debug keys
Browse files Browse the repository at this point in the history
Noticed during #29252.

Release note: None
  • Loading branch information
tbg committed Sep 6, 2018
1 parent 3e62ce0 commit c4b75ff
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/cli/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,13 @@ func loadRangeDescriptor(
// doesn't parse as a range descriptor just skip it.
return false, nil
}
if len(kv.Value) == 0 {
// RangeDescriptor was deleted (range merged away).
return false, nil
}
if err := (roachpb.Value{RawBytes: kv.Value}).GetProto(&desc); err != nil {
return false, err
log.Warningf(context.Background(), "ignoring range descriptor due to error %s: %+v", err, kv)
return false, nil
}
return desc.RangeID == rangeID, nil
}
Expand Down

0 comments on commit c4b75ff

Please sign in to comment.