Check storage is non-nil before attempting to close it#2659
Merged
Conversation
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
philipsu522
approved these changes
Jan 5, 2026
sei-will
approved these changes
Jan 5, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2659 +/- ##
==========================================
- Coverage 46.34% 43.76% -2.58%
==========================================
Files 1239 1906 +667
Lines 108460 159033 +50573
==========================================
+ Hits 50262 69603 +19341
- Misses 53595 83030 +29435
- Partials 4603 6400 +1797
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Kbhat1
approved these changes
Jan 5, 2026
Check that the underlying storage object is non-nil before attempting to close pebble DB. Because, it is possible for the close to be called multiple times, which otherwise will result in panic. The changes here make the multi-call to `Close` into noop. Fixes STO-277
46d8cbf to
b0c25eb
Compare
Make close idempotent since it is harmless to do so, and avoids unnecessary panics. It also adheres to the common behavior of IO package in Go SDK.
github-actions bot
pushed a commit
that referenced
this pull request
Jan 6, 2026
Check that the underlying storage object is non-nil before attempting to close pebble DB. Because, it is possible for the close to be called multiple times, which otherwise will result in panic. The changes here make the multi-call to `Close` into noop. Fixes STO-277 (cherry picked from commit 169e1fa)
|
Successfully created backport PR for |
philipsu522
pushed a commit
that referenced
this pull request
Jan 6, 2026
Check that the underlying storage object is non-nil before attempting to close pebble DB. Because, it is possible for the close to be called multiple times, which otherwise will result in panic. The changes here make the multi-call to `Close` into noop. Fixes STO-277
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Check that the underlying storage object is non-nil before attempting to close pebble DB. Because, it is possible for the close to be called multiple times, which otherwise will result in panic.
The changes here make the multi-call to
Closeinto noop.Fixes STO-277