From f0dc7e61b30f0ddca0468815beca35146b635aac Mon Sep 17 00:00:00 2001 From: Ben Ye Date: Thu, 30 Nov 2023 06:56:20 +0000 Subject: [PATCH] update docs Signed-off-by: Ben Ye --- CHANGELOG.md | 1 + docs/blocks-storage/querier.md | 4 ++++ docs/blocks-storage/store-gateway.md | 4 ++++ docs/configuration/config-file-reference.md | 4 ++++ pkg/storage/tsdb/multilevel_cache.go | 2 +- 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 664aaace31..d57aa80b70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ * [FEATURE] Ingester: Add per-tenant new metric `cortex_ingester_tsdb_data_replay_duration_seconds`. #5477 * [ENHANCEMENT] Store Gateway: Added `-store-gateway.enabled-tenants` and `-store-gateway.disabled-tenants` to explicitly enable or disable store-gateway for specific tenants. #5638 * [ENHANCEMENT] Upgraded Docker base images to `alpine:3.18`. #5684 +* [ENHANCEMENT] Index Cache: Multi level cache adds config `max_backfill_items` to cap max items to backfill per async operation. #5686 ## 1.16.0 2023-11-20 diff --git a/docs/blocks-storage/querier.md b/docs/blocks-storage/querier.md index 524a2699fa..4c303613ca 100644 --- a/docs/blocks-storage/querier.md +++ b/docs/blocks-storage/querier.md @@ -719,6 +719,10 @@ blocks_storage: # CLI flag: -blocks-storage.bucket-store.index-cache.multilevel.max-async-buffer-size [max_async_buffer_size: | default = 10000] + # The maximum number of items to backfill per asynchronous operation. + # CLI flag: -blocks-storage.bucket-store.index-cache.multilevel.max-backfill-items + [max_backfill_items: | default = 10000] + chunks_cache: # Backend for chunks cache, if not empty. Supported values: memcached. # CLI flag: -blocks-storage.bucket-store.chunks-cache.backend diff --git a/docs/blocks-storage/store-gateway.md b/docs/blocks-storage/store-gateway.md index 5a83eecbb3..2d1d89bf3e 100644 --- a/docs/blocks-storage/store-gateway.md +++ b/docs/blocks-storage/store-gateway.md @@ -834,6 +834,10 @@ blocks_storage: # CLI flag: -blocks-storage.bucket-store.index-cache.multilevel.max-async-buffer-size [max_async_buffer_size: | default = 10000] + # The maximum number of items to backfill per asynchronous operation. + # CLI flag: -blocks-storage.bucket-store.index-cache.multilevel.max-backfill-items + [max_backfill_items: | default = 10000] + chunks_cache: # Backend for chunks cache, if not empty. Supported values: memcached. # CLI flag: -blocks-storage.bucket-store.chunks-cache.backend diff --git a/docs/configuration/config-file-reference.md b/docs/configuration/config-file-reference.md index c2c07da5e4..c11b3bbdee 100644 --- a/docs/configuration/config-file-reference.md +++ b/docs/configuration/config-file-reference.md @@ -1268,6 +1268,10 @@ bucket_store: # CLI flag: -blocks-storage.bucket-store.index-cache.multilevel.max-async-buffer-size [max_async_buffer_size: | default = 10000] + # The maximum number of items to backfill per asynchronous operation. + # CLI flag: -blocks-storage.bucket-store.index-cache.multilevel.max-backfill-items + [max_backfill_items: | default = 10000] + chunks_cache: # Backend for chunks cache, if not empty. Supported values: memcached. # CLI flag: -blocks-storage.bucket-store.chunks-cache.backend diff --git a/pkg/storage/tsdb/multilevel_cache.go b/pkg/storage/tsdb/multilevel_cache.go index 1ee9a23a3e..a523a92e92 100644 --- a/pkg/storage/tsdb/multilevel_cache.go +++ b/pkg/storage/tsdb/multilevel_cache.go @@ -3,7 +3,6 @@ package tsdb import ( "context" "errors" - "slices" "sync" "github.com/oklog/ulid" @@ -13,6 +12,7 @@ import ( "github.com/prometheus/prometheus/storage" "github.com/thanos-io/thanos/pkg/cacheutil" storecache "github.com/thanos-io/thanos/pkg/store/cache" + "golang.org/x/exp/slices" ) const (