don't insert nil lazyReader to lazyReaders in case initalization fail…#8480
Merged
yeya24 merged 2 commits intoJan 15, 2026
Merged
Conversation
erlan-z
force-pushed
the
bug-fix-for-block-lazyreader-nil-insertion
branch
from
September 9, 2025 00:54
e71e1d8 to
5c2fb56
Compare
…ed due to corrupt file or other errors Signed-off-by: Erlan Zholdubai uulu <[email protected]>
erlan-z
force-pushed
the
bug-fix-for-block-lazyreader-nil-insertion
branch
from
September 9, 2025 17:48
5c2fb56 to
5dea5f4
Compare
yeya24
previously approved these changes
Jan 15, 2026
yeya24
left a comment
Contributor
There was a problem hiding this comment.
Thanks I think we just need to fix changelog. I think it makes sense to not cache it on error
Signed-off-by: Ben Ye <[email protected]>
Contributor
|
I fixed the merge conflict. Will merge on green |
yeya24
approved these changes
Jan 15, 2026
yuchen-db
added a commit
to databricks/thanos
that referenced
this pull request
Jan 30, 2026
…ed due to corrupt file or other errors (thanos-io#8480) Co-authored-by: Ben Ye <[email protected]> (cherry picked from commit 094aa1d)
coleenquadros
pushed a commit
to coleenquadros/thanos
that referenced
this pull request
Mar 9, 2026
…ed due to corrupt file or other errors (thanos-io#8480) Co-authored-by: Ben Ye <[email protected]>
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.
Changes
This PR fixes a bug in ReaderPool.NewBinaryReader where a failed NewLazyBinaryReader could result in a nil entry being inserted into the lazyReaders map. When the idle reader closer later checked isIdleSince, it would panic on the nil object.
With this fix, a corrupt or incomplete block only causes queries against that block to fail, rather than taking down the entire store process.
Verification
Added
TestReaderPool_NewBinaryReader_ErrDoesNotInsertNilReaderto confirm that failed readers are not inserted and idle reader cleaner runs safely.