Skip to content

Commit

Permalink
debug: don't error in check-store on Range without TruncatedState
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nvanbenschoten committed Aug 29, 2019
1 parent a4b1670 commit 80c1467
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 80c1467

Please sign in to comment.