Skip to content

store/proxy: set {Min,Max}Time accordingly to the nodes#982

Merged
GiedriusS merged 2 commits intothanos-io:masterfrom
GiedriusS:query_set_sane_minmaxtime
Mar 28, 2019
Merged

store/proxy: set {Min,Max}Time accordingly to the nodes#982
GiedriusS merged 2 commits intothanos-io:masterfrom
GiedriusS:query_set_sane_minmaxtime

Conversation

@GiedriusS
Copy link
Copy Markdown
Member

@GiedriusS GiedriusS commented Mar 27, 2019

It doesn't make sense to advertise that a Thanos Query node has data
since the beginning of the time and till the end of time if it only has
nodes which have specific time ranges of data.

Change it accordingly by checking each time range of each node and
setting it to the min/max values.

Calling these functions is fine as the values are cached and TimeRange() functions are protected by mutexes.

It doesn't make sense to advertise that a Thanos Query node has data
since the beginning of the time and till the end of time if it only has
nodes which have specific time ranges of data.

Change it accordingly by checking each time range of each node and
setting it to the min/max values.
Copy link
Copy Markdown
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

Makes sense 👍 LGTM

@bwplotka
Copy link
Copy Markdown
Member

bwplotka commented Mar 28, 2019

But we need to fix the tests (: and make it a non-draft PR

@GiedriusS
Copy link
Copy Markdown
Member Author

Yes yes, I will do that once I will have some more spare time :P

In case there are no configured stores at Thanos Query we want to revert
to the old behaviour and inform the Info() callers that indeed we do
have all of the data.
@GiedriusS GiedriusS marked this pull request as ready for review March 28, 2019 12:27
@GiedriusS GiedriusS merged commit 57a58a7 into thanos-io:master Mar 28, 2019
@GiedriusS GiedriusS deleted the query_set_sane_minmaxtime branch March 28, 2019 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants