Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
* [BUGFIX] Querier: Fix panic due to request tracker truncating multi-byte UTF-8 character #7640
* [BUGFIX] Ingester: Fix panic (`HistogramProtoToHistogram called with a float histogram`) when ingesting a float native histogram with a zero count (e.g. a staleness marker or empty histogram). The decoder is now selected by histogram type via `IsFloatHistogram()` instead of by count value. #7645
* [BUGFIX] Querier: Fix parquet queryable fallback returning a nil error instead of the actual query error in `LabelValues` and `LabelNames`. #7638
* [BUGFIX] Store Gateway: Fix misleading "no index cache backend addresses" validation error being reported for chunks-cache, metadata-cache, and parquet caches when their memcached or redis backend is configured without addresses. The message is now the cache-type-agnostic "no cache backend addresses". #PENDING

## 1.21.0 2026-04-24

Expand Down
26 changes: 26 additions & 0 deletions pkg/storage/tsdb/caching_bucket_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ func Test_BucketCacheBackendValidation(t *testing.T) {
},
expectedErr: errUnsupportedBucketCacheBackend,
},
"memcached backend without addresses": {
cfg: BucketCacheBackend{
Backend: CacheBackendMemcached,
},
expectedErr: errNoIndexCacheAddresses,
},
"redis backend without addresses": {
cfg: BucketCacheBackend{
Backend: CacheBackendRedis,
},
expectedErr: errNoIndexCacheAddresses,
},
"valid multi bucket cache type": {
cfg: BucketCacheBackend{
Backend: fmt.Sprintf("%s,%s,%s", CacheBackendInMemory, CacheBackendMemcached, CacheBackendRedis),
Expand Down Expand Up @@ -155,6 +167,20 @@ func Test_BucketCacheBackendValidation(t *testing.T) {
}
}

func Test_BucketCacheBackendValidation_MissingAddressesErrorIsGeneric(t *testing.T) {
// A bucket cache (e.g. chunks-cache) is not an index cache, so the missing
// addresses error must not mention "index cache". See issue #6804.
for _, cfg := range []BucketCacheBackend{
{Backend: CacheBackendMemcached},
{Backend: CacheBackendRedis},
} {
err := cfg.Validate()
require.Error(t, err)
assert.Equal(t, "no cache backend addresses", err.Error())
assert.NotContains(t, err.Error(), "index cache")
}
}

func Test_BucketIndexCache(t *testing.T) {
const bucketIndexFile = "user1/bucket-index.json.gz"
const fileContent = "test-content"
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/tsdb/index_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var (

errUnsupportedIndexCacheBackend = errors.New("unsupported index cache backend")
errDuplicatedIndexCacheBackend = errors.New("duplicated index cache backend")
errNoIndexCacheAddresses = errors.New("no index cache backend addresses")
errNoIndexCacheAddresses = errors.New("no cache backend addresses")
errInvalidMaxAsyncConcurrency = errors.New("invalid max_async_concurrency, must greater than 0")
errInvalidMaxAsyncBufferSize = errors.New("invalid max_async_buffer_size, must greater than 0")
errInvalidMaxBackfillItems = errors.New("invalid max_backfill_items, must greater than 0")
Expand Down