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

Loki: check new Read target when initializing boltdb-shipper store #4681

Merged
merged 6 commits into from
Nov 7, 2021

Conversation

slim-bean
Copy link
Collaborator

@slim-bean slim-bean commented Nov 6, 2021

What this PR does / why we need it:

We didn't properly register the read and write target in some of the boltdb-shipper specific registration functions, the result was not using the async_store and other code required to have consistent data access as index files are created and shipped to the store.

This PR also fixes/improves the configuration of the chunk_retain_period setting, which is critical for making sure data is accessible after a chunk is flushed when using an index query cache (which boltdb-shipper does automatically using a fifo cache in the ingester component)

Which issue(s) this PR fixes:
Fixes #4680

Special notes for your reviewer:

Checklist

  • Documentation added
  • Tests updated
  • Add an entry in the CHANGELOG.md about the changes.

Copy link
Member

@owen-d owen-d left a comment

Choose a reason for hiding this comment

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

Nice work

@pull-request-size pull-request-size bot added size/M and removed size/S labels Nov 7, 2021
@slim-bean
Copy link
Collaborator Author

Note: this PR also fixes an issue with the shellcheck CI after an update to shellcheck was picked up for this build.

@slim-bean slim-bean merged commit fbebf67 into main Nov 7, 2021
@slim-bean slim-bean deleted the check-read-module branch November 7, 2021 23:29
grafanabot pushed a commit that referenced this pull request Nov 7, 2021
…4681)

* make sure to check for new `Read` target when setting up boltdb-shipper

* also need to make sure ingester querier is added as a dep for Read target

* improve the comment on why we shorten the cache validity.

* fix shellcheck errors

* apply smart defaults to chunk retain period to avoid query gaps.

* typo

(cherry picked from commit fbebf67)
slim-bean added a commit that referenced this pull request Nov 7, 2021
…4681) (#4689)

* make sure to check for new `Read` target when setting up boltdb-shipper

* also need to make sure ingester querier is added as a dep for Read target

* improve the comment on why we shorten the cache validity.

* fix shellcheck errors

* apply smart defaults to chunk retain period to avoid query gaps.

* typo

(cherry picked from commit fbebf67)

Co-authored-by: Ed Welch <[email protected]>
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.

Loki 2.4.0 read target periodically not returning expected logs.
2 participants