Skip to content
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
merged 2 commits into from Aug 31, 2023

Conversation

MichaHoffmann
Copy link
Contributor

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

Fixed possible short reads in bufio Reader.

Verification

Tested manually with azurite

saswatamcode
saswatamcode previously approved these changes Aug 31, 2023
Copy link
Member

@saswatamcode saswatamcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

fpetkovski
fpetkovski previously approved these changes Aug 31, 2023
Copy link
Contributor

@fpetkovski fpetkovski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing find

GiedriusS
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>
@saswatamcode saswatamcode enabled auto-merge (squash) August 31, 2023 12:31
@saswatamcode saswatamcode merged commit 7b20b1d into thanos-io:main Aug 31, 2023
16 checks passed
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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants