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

Query: Allow to ignore No StoreAPIs matched error #5937

Closed
wants to merge 2 commits into from

Conversation

junotx
Copy link
Contributor

@junotx junotx commented Dec 2, 2022

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

Add ignore_no_stores_matched param to Query APIs to allow to ignore No StoreAPIs matched error (default to be specified by --query.ignore-no-stores-matched flag). The query param is also to added to grpc series request for ignoring the same error.

It may fix the issue #5862 .

Verification

@fpetkovski
Copy link
Contributor

I am not sure if this is a good idea to apply by default. In rulers we usually want to catch errors like this one. However, having a flag to disable this warning might be something useful.

@GiedriusS
Copy link
Member

Mhm, I wonder if this is not some issue introduced during the recent proxy.go refactoring. See #5862. It's probably better to investigate what behaviour has changed between versions instead of adding yet another option :/

@junotx
Copy link
Contributor Author

junotx commented Dec 6, 2022

Mhm, I wonder if this is not some issue introduced during the recent proxy.go refactoring. See #5862. It's probably better to investigate what behaviour has changed between versions instead of adding yet another option :/

I reproduce the No StoresAPIs matched error by running receive with an ingester mode and a nonexistent datadir and then using querier to query it before it receives any remote write requests. It has no stores (did not create a tsdb store for the default tenant id) and but still receive query requests and send the error back to querier.

@junotx junotx changed the title Receive: ignore no storeAPIs error if no stores Query: Allow to ignore No StoreAPIs matched error Dec 6, 2022
@junotx
Copy link
Contributor Author

junotx commented Dec 7, 2022

If the configured datadir not exists, receive ingester will not create a default tenant data dir and not create tsdb store for the default tenant id when open MultiTSDB, so it have no any stores but has an infinite TimeRange(MinInt64->MaxInt64) and then can receive query requests from querier.

This may be a special one of cases mentioned by 5862#issuecomment-1312296482.

@stale
Copy link

stale bot commented Jan 7, 2023

Hello 👋 Looks like there was no activity on this amazing PR for the last 30 days.
Do you mind updating us on the status? Is there anything we can help with? If you plan to still work on it, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next week, this issue will be closed (we can always reopen a PR if you get back to this!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Jan 7, 2023
@SuperQ
Copy link
Contributor

SuperQ commented Jan 13, 2023

Ping, is this still being worked on?

@stale stale bot removed the stale label Jan 13, 2023
@fpetkovski
Copy link
Contributor

Possibly related issue: #5230 (comment)

Signed-off-by: junot <[email protected]>
@junotx
Copy link
Contributor Author

junotx commented Jan 29, 2023

conflicts resolved and changelog added

@SuperQ
Copy link
Contributor

SuperQ commented Jan 29, 2023

Do we actually need to plumb in a configuration option for this? Based on the discussion so far, this is a simple bug and we can just make the change.

@benjaminhuo
Copy link
Contributor

Do we actually need to plumb in a configuration option for this? Based on the discussion so far, this is a simple bug and we can just make the change.

@SuperQ You mean we can directly return nil by removing https://github.com/thanos-io/thanos/pull/5937/files#diff-fc53ebad7275ac8861ae5e9e4e937a7cb9c6b267812df9a61f661c842ed94800R284-R289 ?

@SuperQ
Copy link
Contributor

SuperQ commented Jan 29, 2023

I think so. I created #6082 as an alternate proposal.

@benjaminhuo
Copy link
Contributor

benjaminhuo commented Jan 29, 2023

I think so. I created #6082 as an alternate proposal.

Make sense, no error should be returned if no store matched

@bwplotka
Copy link
Member

bwplotka commented Feb 2, 2023

Fixed in #6082, hope that makes sense @junotx - if not let us know 🤗 Closing the PR for now, but we can reopen if we have some improvements to the merged solution.

@matej-g matej-g closed this Feb 7, 2023
@junotx junotx deleted the proxystore branch February 21, 2023 05:40
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.

7 participants