Skip to content

tsdb-manager: do not ship if TSDB index load returns error #9297

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ashwanthgoli
Copy link
Contributor

@ashwanthgoli ashwanthgoli commented Apr 26, 2023

What this PR does / why we need it:
do not ship index if NewShippableTSDBFile returns an error.

 panic: runtime error: invalid memory address or nil pointer dereference                                                                                                                 
 [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x2130edd]                                                                                                             

goroutine 1 [running]:                                                                                                                                                                  

github.com/grafana/loki/pkg/storage/stores/tsdb.(*TSDBFile).Name(0x550000c000c48c30?)                                                                                                         <autogenerated>:1 +0x1d                                                                                                                                                             

github.com/grafana/loki/pkg/storage/stores/indexshipper/uploads.(*indexSet).Add(0xc000c6c400, {0x332f688, 0x0})

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • CHANGELOG.md updated
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/upgrading/_index.md
Signed-off-by: Ashwanth Goli <iamashwanth@gmail.com>
Signed-off-by: Ashwanth Goli <iamashwanth@gmail.com>
@ashwanthgoli ashwanthgoli marked this pull request as ready for review April 26, 2023 13:19
@ashwanthgoli ashwanthgoli requested a review from a team as a code owner April 26, 2023 13:19
Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

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

LGTM, but let's wait for @owen-d's approval before merging pls

Copy link
Contributor

@kavirajk kavirajk left a comment

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 participants