Skip to content

Commit e39eace

Browse files
authored
Always enable Querier BatchIterators (#5868)
* 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>
1 parent b231062 commit e39eace

16 files changed

+33
-743
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* [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
1313
* [CHANGE] Compactor: Don't halt compactor when overlapped source blocks detected. #5854
1414
* [CHANGE] S3 Bucket Client: Expose `-blocks-storage.s3.send-content-md5` flag and set default checksum algorithm to MD5. #5870
15+
* [CHANGE] Querier: Mark `querier.iterators` and `querier.batch-iterators` flags as deprecated. Now querier always use batch iterators. #5868
1516
* [FEATURE] OTLP ingestion experimental. #5813
1617
* [FEATURE] Ingester: Add per-tenant new metric `cortex_ingester_tsdb_data_replay_duration_seconds`. #5477
1718
* [FEATURE] Query Frontend/Scheduler: Add query priority support. #5605

docs/blocks-storage/querier.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,6 @@ querier:
104104
# CLI flag: -querier.timeout
105105
[timeout: <duration> | default = 2m]
106106

107-
# Use iterators to execute query, as opposed to fully materialising the series
108-
# in memory.
109-
# CLI flag: -querier.iterators
110-
[iterators: <boolean> | default = false]
111-
112-
# Use batch iterators to execute query, as opposed to fully materialising the
113-
# series in memory. Takes precedent over the -querier.iterators flag.
114-
# CLI flag: -querier.batch-iterators
115-
[batch_iterators: <boolean> | default = true]
116-
117107
# Use streaming RPCs for metadata APIs from ingester.
118108
# CLI flag: -querier.ingester-metadata-streaming
119109
[ingester_metadata_streaming: <boolean> | default = false]

docs/configuration/config-file-reference.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3609,16 +3609,6 @@ The `querier_config` configures the Cortex querier.
36093609
# CLI flag: -querier.timeout
36103610
[timeout: <duration> | default = 2m]
36113611
3612-
# Use iterators to execute query, as opposed to fully materialising the series
3613-
# in memory.
3614-
# CLI flag: -querier.iterators
3615-
[iterators: <boolean> | default = false]
3616-
3617-
# Use batch iterators to execute query, as opposed to fully materialising the
3618-
# series in memory. Takes precedent over the -querier.iterators flag.
3619-
# CLI flag: -querier.batch-iterators
3620-
[batch_iterators: <boolean> | default = true]
3621-
36223612
# Use streaming RPCs for metadata APIs from ingester.
36233613
# CLI flag: -querier.ingester-metadata-streaming
36243614
[ingester_metadata_streaming: <boolean> | default = false]

pkg/chunk/encoding/instrumentation.go

Lines changed: 0 additions & 91 deletions
This file was deleted.

pkg/chunk/opts.go

Lines changed: 0 additions & 60 deletions
This file was deleted.

pkg/chunk/opts_test.go

Lines changed: 0 additions & 50 deletions
This file was deleted.

pkg/querier/distributor_queryable_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"github.com/cortexproject/cortex/pkg/cortexpb"
2121
"github.com/cortexproject/cortex/pkg/ingester/client"
2222
"github.com/cortexproject/cortex/pkg/prom1/storage/metric"
23+
"github.com/cortexproject/cortex/pkg/querier/batch"
2324
"github.com/cortexproject/cortex/pkg/util"
2425
"github.com/cortexproject/cortex/pkg/util/chunkcompat"
2526
"github.com/cortexproject/cortex/pkg/util/validation"
@@ -190,7 +191,7 @@ func TestIngesterStreaming(t *testing.T) {
190191
nil)
191192

192193
ctx := user.InjectOrgID(context.Background(), "0")
193-
queryable := newDistributorQueryable(d, true, mergeChunks, 0, true)
194+
queryable := newDistributorQueryable(d, true, batch.NewChunkMergeIterator, 0, true)
194195
querier, err := queryable.Querier(mint, maxt)
195196
require.NoError(t, err)
196197

@@ -268,7 +269,7 @@ func TestIngesterStreamingMixedResults(t *testing.T) {
268269
nil)
269270

270271
ctx := user.InjectOrgID(context.Background(), "0")
271-
queryable := newDistributorQueryable(d, true, mergeChunks, 0, true)
272+
queryable := newDistributorQueryable(d, true, batch.NewChunkMergeIterator, 0, true)
272273
querier, err := queryable.Querier(mint, maxt)
273274
require.NoError(t, err)
274275

pkg/querier/iterators/chunk_iterator.go

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)