diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c9fd986ee..f360b19453 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ * [ENHANCEMENT] Query Frontend: Rename `time_taken` field to `time_taken_ms` and make it return millisecond count. #7649 * [ENHANCEMENT] Update prometheus alertmanager version to v0.33.0. #7647 * [ENHANCEMENT] Querier/Ingester: Detach ingester series from gRPC buffers to reduce heap. #7670 +* [BUGFIX] Compactor: Correct misleading help text for `cortex_compactor_garbage_collected_blocks_total` metric; it counted blocks garbage collected by the syncer, not all blocks marked for deletion. #3610 * [BUGFIX] Querier: Fix queryWithRetry and labelsWithRetry returning (nil, nil) on cancelled context by propagating ctx.Err(). #7370 * [BUGFIX] Metrics Helper: Fix non-deterministic bucket order in merged histograms by sorting buckets after map iteration, matching Prometheus client library behavior. #7380 * [BUGFIX] Distributor: Return HTTP 401 Unauthorized when tenant ID resolution fails in the Prometheus Remote Write 2.0 path. #7389 diff --git a/pkg/compactor/compactor_metrics.go b/pkg/compactor/compactor_metrics.go index d777ca9e8e..d1dbd3e9cd 100644 --- a/pkg/compactor/compactor_metrics.go +++ b/pkg/compactor/compactor_metrics.go @@ -120,7 +120,7 @@ func newCompactorMetricsWithLabels(reg prometheus.Registerer, commonLabels []str // Copied from Thanos, pkg/compact/compact.go. m.syncerGarbageCollectedBlocks = promauto.With(reg).NewCounterVec(prometheus.CounterOpts{ Name: "cortex_compactor_garbage_collected_blocks_total", - Help: "Total number of blocks marked for deletion by compactor.", + Help: "Total number of blocks garbage collected (deleted after being marked) by the compactor syncer.", }, nil) m.syncerGarbageCollections = promauto.With(reg).NewCounterVec(prometheus.CounterOpts{ Name: "cortex_compactor_garbage_collection_total", diff --git a/pkg/compactor/compactor_metrics_test.go b/pkg/compactor/compactor_metrics_test.go index 0288bbe909..b1c4e41572 100644 --- a/pkg/compactor/compactor_metrics_test.go +++ b/pkg/compactor/compactor_metrics_test.go @@ -65,7 +65,7 @@ func TestCompactorMetrics(t *testing.T) { cortex_compactor_blocks_marked_for_deletion_total{reason="compaction",user="aaa"} 144430 cortex_compactor_blocks_marked_for_deletion_total{reason="compaction",user="bbb"} 155540 cortex_compactor_blocks_marked_for_deletion_total{reason="compaction",user="ccc"} 166650 - # HELP cortex_compactor_garbage_collected_blocks_total Total number of blocks marked for deletion by compactor. + # HELP cortex_compactor_garbage_collected_blocks_total Total number of blocks garbage collected (deleted after being marked) by the compactor syncer. # TYPE cortex_compactor_garbage_collected_blocks_total counter cortex_compactor_garbage_collected_blocks_total 99990 # HELP cortex_compactor_garbage_collection_duration_seconds Time it took to perform garbage collection iteration.