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

fix query intervals when running boltdb-shipper in single binary #2855

Merged
merged 1 commit into from
Nov 5, 2020

Conversation

sandeepsukhani
Copy link
Contributor

What this PR does / why we need it:
When running boltdb-shipper in single binary mode, we also make ingesters do the store query. We build a non-overlapping query interval for ingester and store query. While building ingester query, instead of clamping the start time of query to ingesters max look back period, I was setting the start time of the query to the max look back period which was causing more logs to be fetched than queried for.

While there were tests to check it, the tests were wrong too because instead of comparing unix timestamp I was comparing value returned by time.Second. This PR also takes care of fixing the tests.

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

Checklist

  • Tests updated

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.

LGTM

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Time range queries do not work when boltdb-shipper is used
3 participants