Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
40343: debug: don't error in check-store on Range without TruncatedState r=nvanbenschoten a=nvanbenschoten

Otherwise we get lots of errors like:
```
range 411: truncated index 0 should equal first index 0 - 1
range 306: truncated index 0 should equal first index 0 - 1
range 399: truncated index 0 should equal first index 0 - 1
range 290: truncated index 0 should equal first index 0 - 1
range 340: truncated index 0 should equal first index 0 - 1
range 547: truncated index 0 should equal first index 0 - 1
range 266: truncated index 0 should equal first index 0 - 1
```

Release note: None

Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
  • Loading branch information
craig[bot] and nvanbenschoten committed Aug 29, 2019
2 parents 028573f + 80c1467 commit 9baf0f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cli/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ func runDebugCheckStoreRaft(ctx context.Context, db *engine.RocksDB) error {
}

for rangeID, info := range replicaInfo {
if info.truncatedIndex != info.firstIndex-1 {
if info.truncatedIndex != 0 && info.truncatedIndex != info.firstIndex-1 {
hasError = true
fmt.Printf("range %s: truncated index %v should equal first index %v - 1\n",
rangeID, info.truncatedIndex, info.firstIndex)
Expand Down

0 comments on commit 9baf0f1

Please sign in to comment.