New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store: fix postings reader short reads #6684
Merged
saswatamcode
merged 2 commits into
thanos-io:main
from
MichaHoffmann:mhoffm-fix-postings-reader
Aug 31, 2023
Merged
Store: fix postings reader short reads #6684
saswatamcode
merged 2 commits into
thanos-io:main
from
MichaHoffmann:mhoffm-fix-postings-reader
Aug 31, 2023
Conversation
This file contains 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
MichaHoffmann
force-pushed
the
mhoffm-fix-postings-reader
branch
from
August 31, 2023 11:46
1b3b466
to
c9642bc
Compare
saswatamcode
previously approved these changes
Aug 31, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!!
fpetkovski
previously approved these changes
Aug 31, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing find
GiedriusS
previously approved these changes
Aug 31, 2023
bufio.Reader can return less bytes than needed. Go documentation suggests to use io.ReadFull Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>
MichaHoffmann
dismissed stale reviews from GiedriusS, fpetkovski, and saswatamcode
via
August 31, 2023 12:24
9e2026a
MichaHoffmann
force-pushed
the
mhoffm-fix-postings-reader
branch
from
August 31, 2023 12:24
5fe9ddc
to
9e2026a
Compare
saswatamcode
approved these changes
Aug 31, 2023
saswatamcode
pushed a commit
to saswatamcode/thanos
that referenced
this pull request
Aug 31, 2023
bufio.Reader can return less bytes than needed. Go documentation suggests to use io.ReadFull Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>
saswatamcode
added a commit
that referenced
this pull request
Aug 31, 2023
* store: fix race when iterating blocks (#6675) Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com> * store: Record stats even on ExpandPostings error (#6679) Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com> * Store: fix forgotten field in store stats merge (#6681) Signed-off-by: Michael Hoffmann <mhoffm@posteo.de> * Store: fix postings reader short reads (#6684) bufio.Reader can return less bytes than needed. Go documentation suggests to use io.ReadFull Signed-off-by: Michael Hoffmann <mhoffm@posteo.de> * Cut patch release v0.32.2 Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com> --------- Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com> Signed-off-by: Michael Hoffmann <mhoffm@posteo.de> Co-authored-by: Michael Hoffmann <mhoffm@posteo.de>
coleenquadros
pushed a commit
to coleenquadros/thanos
that referenced
this pull request
Sep 18, 2023
bufio.Reader can return less bytes than needed. Go documentation suggests to use io.ReadFull Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>
coleenquadros
pushed a commit
to coleenquadros/thanos
that referenced
this pull request
Sep 18, 2023
* store: fix race when iterating blocks (thanos-io#6675) Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com> * store: Record stats even on ExpandPostings error (thanos-io#6679) Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com> * Store: fix forgotten field in store stats merge (thanos-io#6681) Signed-off-by: Michael Hoffmann <mhoffm@posteo.de> * Store: fix postings reader short reads (thanos-io#6684) bufio.Reader can return less bytes than needed. Go documentation suggests to use io.ReadFull Signed-off-by: Michael Hoffmann <mhoffm@posteo.de> * Cut patch release v0.32.2 Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com> --------- Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com> Signed-off-by: Michael Hoffmann <mhoffm@posteo.de> Co-authored-by: Michael Hoffmann <mhoffm@posteo.de>
coleenquadros
pushed a commit
to coleenquadros/thanos
that referenced
this pull request
Sep 18, 2023
* store: fix race when iterating blocks (thanos-io#6675) Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com> * store: Record stats even on ExpandPostings error (thanos-io#6679) Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com> * Store: fix forgotten field in store stats merge (thanos-io#6681) Signed-off-by: Michael Hoffmann <mhoffm@posteo.de> * Store: fix postings reader short reads (thanos-io#6684) bufio.Reader can return less bytes than needed. Go documentation suggests to use io.ReadFull Signed-off-by: Michael Hoffmann <mhoffm@posteo.de> * Cut patch release v0.32.2 Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com> --------- Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com> Signed-off-by: Michael Hoffmann <mhoffm@posteo.de> Co-authored-by: Michael Hoffmann <mhoffm@posteo.de>
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
Fixed possible short reads in bufio Reader.
Verification
Tested manually with azurite