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

store-gateway: bucketStore tests with and without streaming #3658

Conversation

dimitarvdimitrov
Copy link
Contributor

This PR also removes the streaming implementation from

  • TestSeries_BlockWithMultipleChunks, which I think is ok because we
    already have unit tests for multiple chunks in our units
  • TestLabelNamesAndValuesHints label values aren't using streaming
    still anyway
  • TestSeries_ErrorUnmarshallingRequestHints this should be independent
    of how series are fetched (streaming or not)

pkg/storegateway now takes 109.121s to run on my machine compared to the
94.677s it took before

This PR also removes the streaming implementation from
* `TestSeries_BlockWithMultipleChunks`, which I think is ok because we
already have unit tests for multiple chunks in our units
* `TestLabelNamesAndValuesHints` label values aren't using streaming
still anyway
* `TestSeries_ErrorUnmarshallingRequestHints` this should be independent
 of how series are fetched (streaming or not)

pkg/storegateway now takes 109.121s to run on my machine compared to the
 94.677s it took before

Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
@dimitarvdimitrov dimitarvdimitrov requested a review from a team as a code owner December 6, 2022 13:08
Copy link
Collaborator

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

Good job! I just left few nits.

assert.NoError(t, err)
factory := func(opts ...prepareStoreConfigOption) *storeSuite {
opts = append(opts, withBucketStoreOptions(WithStreamingSeriesPerBatch(1000)))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Each Series() call in the tests should use multiple batches. Is it the case if we use such a large batch? What if we drastically reduce to 10 and leave a comment on why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

makes sense to me, i did the change in d0d52a8

}
for testName, bucketStoreOpts := range map[string][]BucketStoreOption{
"run with default options": {WithLogger(logger), WithChunkPool(chunkPool)},
"with series streaming": {WithLogger(logger), WithChunkPool(chunkPool), WithStreamingSeriesPerBatch(5000)},
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comment here. How many series do we have in this test?
You may also consider having 2 test cases, one with small batches and one with big batches.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this runs with many different setups for series - from 1 series to 1M series and different number of samples per series

I made two variations - one with 1K series and one with 10K series. I think those two are more realistic. WDYT?

pkg/storegateway/bucket_test.go Outdated Show resolved Hide resolved
pkg/storegateway/bucket_test.go Outdated Show resolved Hide resolved
pkg/storegateway/bucket_test.go Outdated Show resolved Hide resolved
pkg/storegateway/bucket_test.go Outdated Show resolved Hide resolved
pkg/storegateway/bucket_test.go Outdated Show resolved Hide resolved
dimitarvdimitrov and others added 5 commits December 6, 2022 15:57
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
…stAndResponseHints

Signed-off-by: Marco Pracucci <marco@pracucci.com>
@pracucci pracucci merged commit f3cfd15 into dimitar/store-gateway-async-series Dec 6, 2022
@pracucci pracucci deleted the dimitar/bucket-tests-with-streaming branch December 6, 2022 15:47
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.

2 participants