Skip to content

Commit

Permalink
Merge pull request #16027 from cockroachdb/marc/cherrypick_16025
Browse files Browse the repository at this point in the history
storage: panic instead of Fatal to surface assertion
  • Loading branch information
mberhault authored May 18, 2017
2 parents 0c7b08e + 9724609 commit 50fd18d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/storage/replica.go
Original file line number Diff line number Diff line change
Expand Up @@ -1350,10 +1350,7 @@ func (r *Replica) assertStateRLocked(reader engine.Reader) {
// TODO(dt): expose properly once #15892 is addressed.
log.Errorf(ctx, "on-disk and in-memory state diverged:\n%s", pretty.Diff(diskState, r.mu.state))
r.mu.state.Desc, diskState.Desc = nil, nil
log.Fatal(
ctx, log.Safe{
V: fmt.Sprintf("on-disk and in-memory state diverged:\n%s", pretty.Diff(diskState, r.mu.state)),
})
panic(log.Safe{V: fmt.Sprintf("on-disk and in-memory state diverged: %s", pretty.Diff(diskState, r.mu.state))})
}
}

Expand Down

0 comments on commit 50fd18d

Please sign in to comment.