Release 0.42.0#8905
Merged
Merged
Conversation
If the querier receives a query but it has an empty list of stores, and partial response is disabled, then we should error out.
We either:
- didn't finish discovery yet - although querier would be marked as not-ready, so it shouldn't receive requests (unless sender doesn't check for ready status)
- all stores are simply gone and discovery doesn't return these - could be problem with discovery, could be that all stores disappeared
If there are no stores at all and partial response is disabled then it's unlikely that the user wants 200 OK here. This can be bogus config or some operational issue, either way querier with no stores is not a valid querier and so shouldn't pretend that it's giving back a legitimate response.
I didn't want to check store count by doing second stores() call, because the list of stores could change between these stores() calls and so if we had:
if len(s.stores()) == 0 {...}
followed by another call to s.stores() then the first call might get non-empty list while the second call might return empty list.
Having a single call to stores() here requires a small refactoring to avoid calling stores() inside functions we call, so stores list is passed around.
Signed-off-by: Lukasz Mierzwa <lukasz@cloudflare.com>
Signed-off-by: Enno Richter <2536303+elohmeier@users.noreply.github.com>
Signed-off-by: Andy Asp <andy.asp@grafana.com>
In #8889 we've added a check on the number of stores registered, also guarded on partial response, but it seems that there are two ways partial response is signaled to the engine: - PartialResponseDisabled == false - PartialResponseStrategy == PartialResponseStrategy_WARN Original PR only uses first, but not the second. Also check second field. Signed-off-by: Lukasz Mierzwa <lukasz@cloudflare.com>
Signed-off-by: Santiago Bricio Rojas <sanbriciorojas11@gmail.com>
- Properly call closers when an error occurs - Do not append to the collectors slice in the unregisterer because the other method does that already Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull a bunch of fixes and release 0.42.0.