-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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: add consistency delay to fetch blocks #2009
Conversation
5a48716
to
9e9e53f
Compare
Although this is a rough implementation of adding filters in store, I wanted to get feedback on this approach. I have added two filters: Please let me know if there are any additional filters that I should apply and also if this is in the right direction. |
8d802d9
to
e9ecbd6
Compare
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.
Some small comments but overall looks good to me! Thanks a lot! Also, it seems like we have another case of flaky CI tests, will rerun it.
d012a46
to
568595b
Compare
@GiedriusS the tests are still breaking, can you retrigger them? Also please check if that it because of code changes |
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.
Yes, your changes are indeed related. It's a good opportunity to try to run the E2E tests on your machine locally and see what's wrong, and update / improve them. In the CircleCI page you can see the debug message block is too fresh for now
being printed by Thanos Store which means that it has filtered some blocks which hasn't occurred before and hence most likely Thanos Query cannot find which StoreAPI nodes to query. This is because Thanos Store announces all of the label sets that it finds - you can see that in the /stores
page.
3c68464
to
53230ac
Compare
1a57ad2
to
1faaec1
Compare
The The reason is that in this test, we are creating the block by calling tsdb LeveledCompactor's Write function. Is there anyway in which I can provide the id of the block to write to tsdb? Otherwise we have to use consistencyDelay as 0. |
AFAIK, there is no way to customize block id when you want to create a block in TSDB using the existing API |
What would be an alternate way to test a block id that was created consistencyDelay time ago? Our default value of consistencyDelay is 30m, so we want to only fetch the blocks which are older than 30m. If we use consistencyDelay as 30m, then the call to fetch blocks fails saying that the block is too fresh. Is there a way to test the retrieval of blocks that are old? |
b63cb1d
to
3409c5b
Compare
3409c5b
to
8dcd5ce
Compare
dbcca66
to
76daceb
Compare
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.
Hi!
It's looking good, but I think we are trying to do same thing 3 times here:
- duplicate block filter
- garbage finder filter
- garbage finer in compactor loop
Can we have... one way of dealing with duplicate/garbage blocks? ;p
76daceb
to
d6bed5f
Compare
f41be37
to
5fd6f5f
Compare
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.
Awesome!!! Looking super nice, some last suggestions I think 👍
5fd6f5f
to
be70e91
Compare
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 👍
Good work I love this ❤️
LGTM, just minor nits.
be70e91
to
b01e437
Compare
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.
Thank you!
This looks amazing! Let's merge after rebase and super minor suggestion:muscle:
Signed-off-by: khyatisoneji <[email protected]>
b01e437
to
51d0baa
Compare
Signed-off-by: khyatisoneji <[email protected]>
Add consistency delay in store component to fetch blocks