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

receive: Remove MultiTSDBStore and replace with ProxyStore #2864

Closed
bwplotka opened this issue Jul 8, 2020 · 23 comments
Closed

receive: Remove MultiTSDBStore and replace with ProxyStore #2864

bwplotka opened this issue Jul 8, 2020 · 23 comments

Comments

@bwplotka
Copy link
Member

bwplotka commented Jul 8, 2020

Those two structs are quite complex, but are doing exactly the same thing.

Few (smallish) work Items to make that happen:

  • rename storeRef to cachedStoreClient
  • create localStoreClient that will allow calling locally some storepb.StoreServer. For receive, it would be TSDBStores. This will need to use our tenantSeriesSetServer or something similar.
  • ensure similar spans for tracing and error logging with tenant ids

Motivation

Maintaining two literally same things is tedious, we can simplify things 🤗 Especially that we have nice timeout, chunk dedup etc logics for proxy store we might want to use.

Action Items:

  • Thanos Receive is using ProxyStore instead of MultiTSDBStore for fanout Series request to TSDBs\
  • MultiTSDB benchmark exists, just is swapped with ProxyStore
  • Benchmarks before & after is produced, following script can be used:
#!/usr/bin/env bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

cd ${DIR}/../

NUM=${1}
RUN="${NUM}-receiveseries"
mkdir -p ${DIR}/bench_outs/${RUN}

for TEST in BenchmarkMultiTSDBSeries
do
echo "Running ${TEST} run ${RUN}"
go test -bench=${TEST} -run=^$ -benchmem -memprofile ${DIR}/bench_outs/${RUN}/memprofile${TEST//\//-}.out -timeout 2h -benchtime 30s ./pkg/store | tee  ${DIR}/bench_outs/${RUN}/bench${TEST//\//-}.out
done

PREV=$((NUM - 1))
benchstat -delta-test none ${DIR}/bench_outs/${PREV}-receiveseries/BenchmarkMultiTSDBSeries.out ${DIR}/bench_outs/${RUN}/BenchmarkMultiTSDBSeries.out | tee ${DIR}/bench_outs/${RUN}/diff.out

cc @brancz @kakkoyun

@brancz
Copy link
Member

brancz commented Jul 9, 2020

There were a few things that I ran into that I felt made this forced and caused odd interface implementations to make use of a "generic" abstraction. If you can come up with something reasonable though I'm all for deduplicating.

@bwplotka
Copy link
Member Author

bwplotka commented Jul 9, 2020

Yea, I think you might mean Client interface. This is bit more wider than gRPC StoreAPI Server, but still easy to implement something for local TSDBStore to fit (:

Help wanted!

@brancz
Copy link
Member

brancz commented Jul 9, 2020

Yeah I still think it needs some refactoring I wouldn't want to press it into an interface that doesn't actually fit, the Addr() function for example makes no sense here. Again, I'm not against it, I just think it needs a larger refactoring, then I think this could work nicely.

@stale
Copy link

stale bot commented Aug 8, 2020

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

@stale stale bot added the stale label Aug 8, 2020
@bwplotka
Copy link
Member Author

bwplotka commented Aug 8, 2020 via email

@stale stale bot removed the stale label Aug 8, 2020
@stale
Copy link

stale bot commented Sep 7, 2020

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

@stale stale bot added the stale label Sep 7, 2020
@kakkoyun kakkoyun removed the stale label Sep 7, 2020
@stale
Copy link

stale bot commented Nov 7, 2020

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Nov 7, 2020
@bwplotka
Copy link
Member Author

bwplotka commented Nov 7, 2020 via email

@stale stale bot removed the stale label Nov 7, 2020
@stale
Copy link

stale bot commented Jan 6, 2021

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Jan 6, 2021
@onprem onprem removed the stale label Jan 6, 2021
@stale
Copy link

stale bot commented Mar 16, 2021

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Mar 16, 2021
@stale
Copy link

stale bot commented Apr 7, 2021

Closing for now as promised, let us know if you need this to be reopened! 🤗

@stale stale bot closed this as completed Apr 7, 2021
@Abhishek357
Copy link
Contributor

still valid

@kakkoyun kakkoyun reopened this Apr 20, 2021
@stale stale bot removed the stale label Apr 20, 2021
@stale
Copy link

stale bot commented Jun 20, 2021

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Jun 20, 2021
@stale
Copy link

stale bot commented Jul 8, 2021

Closing for now as promised, let us know if you need this to be reopened! 🤗

@stale stale bot closed this as completed Jul 8, 2021
@yeya24 yeya24 reopened this Jul 8, 2021
@stale stale bot removed the stale label Jul 8, 2021
@stale
Copy link

stale bot commented Sep 6, 2021

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Sep 6, 2021
@stale
Copy link

stale bot commented Sep 22, 2021

Closing for now as promised, let us know if you need this to be reopened! 🤗

@stale stale bot closed this as completed Sep 22, 2021
@yeya24
Copy link
Contributor

yeya24 commented Sep 23, 2021

Still valid I think.
Something really nice to support this is to have tenant label matching and min/max time filtering at the Series grpc request. This could make the receiver query faster.

@yeya24 yeya24 reopened this Sep 23, 2021
@stale stale bot removed the stale label Sep 23, 2021
@matej-g
Copy link
Collaborator

matej-g commented Nov 22, 2021

I looked into this TODO as a part of working on something else, I think it should be doable (and yes, some adjustments to the client interface would be nice to make this fit more reasonably). I'll try to come back with a draft PR.

@stale
Copy link

stale bot commented Mar 2, 2022

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Mar 2, 2022
@stale
Copy link

stale bot commented Apr 17, 2022

Closing for now as promised, let us know if you need this to be reopened! 🤗

@stale stale bot closed this as completed Apr 17, 2022
@matej-g
Copy link
Collaborator

matej-g commented Apr 19, 2022

Still relevant (still not done due to lack of time 😿)

@matej-g matej-g reopened this Apr 19, 2022
@stale stale bot removed the stale label Apr 19, 2022
@stale
Copy link

stale bot commented Aug 13, 2022

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Aug 13, 2022
@matej-g
Copy link
Collaborator

matej-g commented Oct 6, 2022

Resolved via #5552

@matej-g matej-g closed this as completed Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants