Skip to content

Commit

Permalink
Always enable Querier BatchIterators (#5868)
Browse files Browse the repository at this point in the history
* deprecate querier.iterators and querier.batch-iterators flags

Signed-off-by: Ben Ye <benye@amazon.com>

* update

Signed-off-by: Ben Ye <benye@amazon.com>

* cleanup

Signed-off-by: Ben Ye <benye@amazon.com>

* update docs

Signed-off-by: Ben Ye <benye@amazon.com>

* cleanup unused functions

Signed-off-by: Ben Ye <benye@amazon.com>

* changelog

Signed-off-by: Ben Ye <benye@amazon.com>

* remove more unused code

Signed-off-by: Ben Ye <benye@amazon.com>

---------

Signed-off-by: Ben Ye <benye@amazon.com>
  • Loading branch information
yeya24 authored Apr 22, 2024
1 parent b231062 commit e39eace
Show file tree
Hide file tree
Showing 16 changed files with 33 additions and 743 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* [CHANGE] Compactor/Bucket Store: Added `-blocks-storage.bucket-store.block-discovery-strategy` to configure different block listing strategy. Reverted the current recursive block listing mechanism and use the strategy `Concurrent` as in 1.15. #5828
* [CHANGE] Compactor: Don't halt compactor when overlapped source blocks detected. #5854
* [CHANGE] S3 Bucket Client: Expose `-blocks-storage.s3.send-content-md5` flag and set default checksum algorithm to MD5. #5870
* [CHANGE] Querier: Mark `querier.iterators` and `querier.batch-iterators` flags as deprecated. Now querier always use batch iterators. #5868
* [FEATURE] OTLP ingestion experimental. #5813
* [FEATURE] Ingester: Add per-tenant new metric `cortex_ingester_tsdb_data_replay_duration_seconds`. #5477
* [FEATURE] Query Frontend/Scheduler: Add query priority support. #5605
Expand Down
10 changes: 0 additions & 10 deletions docs/blocks-storage/querier.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,6 @@ querier:
# CLI flag: -querier.timeout
[timeout: <duration> | default = 2m]

# Use iterators to execute query, as opposed to fully materialising the series
# in memory.
# CLI flag: -querier.iterators
[iterators: <boolean> | default = false]

# Use batch iterators to execute query, as opposed to fully materialising the
# series in memory. Takes precedent over the -querier.iterators flag.
# CLI flag: -querier.batch-iterators
[batch_iterators: <boolean> | default = true]

# Use streaming RPCs for metadata APIs from ingester.
# CLI flag: -querier.ingester-metadata-streaming
[ingester_metadata_streaming: <boolean> | default = false]
Expand Down
10 changes: 0 additions & 10 deletions docs/configuration/config-file-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -3609,16 +3609,6 @@ The `querier_config` configures the Cortex querier.
# CLI flag: -querier.timeout
[timeout: <duration> | default = 2m]
# Use iterators to execute query, as opposed to fully materialising the series
# in memory.
# CLI flag: -querier.iterators
[iterators: <boolean> | default = false]
# Use batch iterators to execute query, as opposed to fully materialising the
# series in memory. Takes precedent over the -querier.iterators flag.
# CLI flag: -querier.batch-iterators
[batch_iterators: <boolean> | default = true]
# Use streaming RPCs for metadata APIs from ingester.
# CLI flag: -querier.ingester-metadata-streaming
[ingester_metadata_streaming: <boolean> | default = false]
Expand Down
91 changes: 0 additions & 91 deletions pkg/chunk/encoding/instrumentation.go

This file was deleted.

60 changes: 0 additions & 60 deletions pkg/chunk/opts.go

This file was deleted.

50 changes: 0 additions & 50 deletions pkg/chunk/opts_test.go

This file was deleted.

5 changes: 3 additions & 2 deletions pkg/querier/distributor_queryable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/cortexproject/cortex/pkg/cortexpb"
"github.com/cortexproject/cortex/pkg/ingester/client"
"github.com/cortexproject/cortex/pkg/prom1/storage/metric"
"github.com/cortexproject/cortex/pkg/querier/batch"
"github.com/cortexproject/cortex/pkg/util"
"github.com/cortexproject/cortex/pkg/util/chunkcompat"
"github.com/cortexproject/cortex/pkg/util/validation"
Expand Down Expand Up @@ -190,7 +191,7 @@ func TestIngesterStreaming(t *testing.T) {
nil)

ctx := user.InjectOrgID(context.Background(), "0")
queryable := newDistributorQueryable(d, true, mergeChunks, 0, true)
queryable := newDistributorQueryable(d, true, batch.NewChunkMergeIterator, 0, true)
querier, err := queryable.Querier(mint, maxt)
require.NoError(t, err)

Expand Down Expand Up @@ -268,7 +269,7 @@ func TestIngesterStreamingMixedResults(t *testing.T) {
nil)

ctx := user.InjectOrgID(context.Background(), "0")
queryable := newDistributorQueryable(d, true, mergeChunks, 0, true)
queryable := newDistributorQueryable(d, true, batch.NewChunkMergeIterator, 0, true)
querier, err := queryable.Querier(mint, maxt)
require.NoError(t, err)

Expand Down
64 changes: 0 additions & 64 deletions pkg/querier/iterators/chunk_iterator.go

This file was deleted.

Loading

0 comments on commit e39eace

Please sign in to comment.