storage: replace a few panics with log.Fatal #16482
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
panic causes stacks to unwind and defers to be invoked (possibly
releasing locks) until eventually something either handles the
panic (unlikely) or we reach the runtime and it kills the process. While
the process is dying, other goroutines are still running which may
encounter invalid states due to the panic. These invalid states can
produce fatal errors of there own which seem impossible and are
difficult to debug. For fatal errors we should use log.Fatal{,f} instead
which will kill the process before any locks are released.
See #16479