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: create streamed proxy store #3

Draft
wants to merge 2 commits into
base: store-label-sort
Choose a base branch
from

Conversation

GiedriusS
Copy link

My idea is to created a streamed proxy store that is passed to Select(). Use InfoServer to determine whether all clients sends streamed data instead of hints so that we could decide in advance whether sorting is needed or not.

Signed-off-by: Giedrius Statkevičius giedrius.statkevicius@vinted.com

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

Changes

Verification

fpetkovski and others added 2 commits October 18, 2022 07:49
This commit adds functionality to all stores to sort series labels
in order appropriate for deduplication. This is done by propagating
replica labels from the Querier in the Series request. When all stores
send a hint that they support sorting labels, we can rely on the k-way
merge in the proxy and avoid an expensive global sort.

For backwards compatibility, each Store will send a hint in the
SeriesResponse to indicate that it supports this functionality.
The hint is sent at the beginning of the stream, and is the first
response that each store will send.

The Store Proxy will inspect the hints from each store and detect
cases where a store does not support resorting of labels. In that case
it will itself send a hint upstream that sorting is not supported.

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
My idea is to created a streamed proxy store that is passed to Select().
Use InfoServer to determine whether all clients sends streamed data
instead of hints so that we could decide in advance whether sorting is
needed or not.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
@bwplotka
Copy link

I like Info change ,but not sure why making Proxy server not a gRPC server but custom interface is helpful here

@fpetkovski fpetkovski force-pushed the store-label-sort branch 11 times, most recently from 5644be4 to 132365f Compare October 19, 2022 08:54
@bwplotka
Copy link

Ah, I see - I would use https://github.com/thanos-io/thanos/blob/202fb4d46f35b91577bbc977d46c27f0e6f15e90/pkg/store/storepb/inprocess.go#L49 honestly instead if we want to stream here. But I don't think this is needed now before we rethink PromQL engine implementation: https://github.com/thanos-io/thanos/pull/5796/files#r999204839

@fpetkovski fpetkovski force-pushed the store-label-sort branch 6 times, most recently from 07bf562 to 03409b7 Compare October 25, 2022 14:17
fpetkovski pushed a commit that referenced this pull request Mar 6, 2023
…ct-app/ejs-3.1.8

This security update has been merged automatically as part of [an initiative to lower Shopify's dependency debt](https://vault.shopify.io/pages/13845-The-Big-Auto-Merge).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants