Skip to content

Commit b045e8a

Browse files
committed
changelog
Signed-off-by: Alan Protasio <[email protected]>
1 parent 6743799 commit b045e8a

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
* [CHANGE] Store Gateway: Remove `idle_timeout`, `max_conn_age`, `pool_size`, `min_idle_conns` fields for Redis index cache and caching bucket. #5448
2222
* [CHANGE] Store Gateway: Add flag `-store-gateway.sharding-ring.zone-stable-shuffle-sharding` to enable store gateway to use zone stable shuffle sharding. #5489
2323
* [CHANGE] Bucket Index: Add `series_max_size` and `chunk_max_size` to bucket index. #5489
24+
* [CHANGE] StoreGateway: Rename `cortex_bucket_store_chunk_pool_returned_bytes_total` and `cortex_bucket_store_chunk_pool_requested_bytes_total` to `cortex_bucket_store_chunk_pool_operation_bytes_total`. #5552
2425
* [CHANGE] Query Frontend/Querier: Make build info API disabled by default and add feature flag `api.build-info-enabled` to enable it. #5533
2526
* [FEATURE] Store Gateway: Add `max_downloaded_bytes_per_request` to limit max bytes to download per store gateway request.
2627
* [FEATURE] Added 2 flags `-alertmanager.alertmanager-client.grpc-max-send-msg-size` and ` -alertmanager.alertmanager-client.grpc-max-recv-msg-size` to configure alert manager grpc client message size limits. #5338

pkg/storegateway/chunk_bytes_pool.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func newChunkBytesPool(minBucketSize, maxBucketSize int, maxChunkPoolBytes uint6
2222
return &chunkBytesPool{
2323
pool: upstream,
2424
poolByteStats: promauto.With(reg).NewCounterVec(prometheus.CounterOpts{
25-
Name: "cortex_bucket_store_chunk_pool_bytes_total",
25+
Name: "cortex_bucket_store_chunk_pool_operation_bytes_total",
2626
Help: "Total bytes number of bytes pooled by operation.",
2727
}, []string{"operation", "stats"}),
2828
}, nil
@@ -34,14 +34,14 @@ func (p *chunkBytesPool) Get(sz int) (*[]byte, error) {
3434
return buffer, err
3535
}
3636

37-
p.poolByteStats.WithLabelValues("Get", "Requested").Add(float64(sz))
38-
p.poolByteStats.WithLabelValues("Get", "Cap").Add(float64(cap(*buffer)))
37+
p.poolByteStats.WithLabelValues("get", "requested").Add(float64(sz))
38+
p.poolByteStats.WithLabelValues("get", "cap").Add(float64(cap(*buffer)))
3939

4040
return buffer, err
4141
}
4242

4343
func (p *chunkBytesPool) Put(b *[]byte) {
44-
p.poolByteStats.WithLabelValues("Put", "Len").Add(float64(len(*b)))
45-
p.poolByteStats.WithLabelValues("Put", "Cap").Add(float64(cap(*b)))
44+
p.poolByteStats.WithLabelValues("put", "len").Add(float64(len(*b)))
45+
p.poolByteStats.WithLabelValues("put", "cap").Add(float64(cap(*b)))
4646
p.pool.Put(b)
4747
}

pkg/storegateway/chunk_bytes_pool_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ func TestChunkBytesPool_Get(t *testing.T) {
3131
p.Put(b)
3232

3333
assert.NoError(t, testutil.GatherAndCompare(reg, bytes.NewBufferString(fmt.Sprintf(`
34-
# HELP cortex_bucket_store_chunk_pool_bytes_total Total bytes number of bytes pooled by operation.
35-
# TYPE cortex_bucket_store_chunk_pool_bytes_total counter
36-
cortex_bucket_store_chunk_pool_bytes_total{operation="Get",stats="Cap"} %d
37-
cortex_bucket_store_chunk_pool_bytes_total{operation="Get",stats="Requested"} %d
38-
cortex_bucket_store_chunk_pool_bytes_total{operation="Put",stats="Cap"} %d
39-
cortex_bucket_store_chunk_pool_bytes_total{operation="Put",stats="Len"} %d
34+
# HELP cortex_bucket_store_chunk_pool_operation_bytes_total Total bytes number of bytes pooled by operation.
35+
# TYPE cortex_bucket_store_chunk_pool_operation_bytes_total counter
36+
cortex_bucket_store_chunk_pool_operation_bytes_total{operation="get",stats="cap"} %d
37+
cortex_bucket_store_chunk_pool_operation_bytes_total{operation="get",stats="requested"} %d
38+
cortex_bucket_store_chunk_pool_operation_bytes_total{operation="put",stats="cap"} %d
39+
cortex_bucket_store_chunk_pool_operation_bytes_total{operation="put",stats="len"} %d
4040
`, store.EstimatedMaxChunkSize*3, store.EstimatedMaxChunkSize*2, store.EstimatedMaxChunkSize*2, len(testBytes)))))
4141
}

0 commit comments

Comments
 (0)