You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d9ba0a5
Browse filesBrowse the repository at this point in the historyBrowse files
* Compactor: add per-time-range backlog metrics and oldest level 1 block
Add the time_range_milliseconds label to
cortex_compactor_remaining_planned_compactions and
cortex_compactor_oldest_partition_offset. Both were summed over every
compaction time range, so the smallest range, where a backlog matters
soonest, could not be read on its own.
Every configured -compactor.block-ranges entry is reported on each run,
so a range with nothing outstanding reads zero instead of holding the
value from the run that last saw work for it. Per-tenant deletion of the
two metrics now matches on the user label alone, because
DeleteLabelValues silently does nothing once a vec has two labels.
Add cortex_compactor_oldest_level_1_block_offset_seconds, reporting per
tenant how long ago the oldest level 1 block still listed in the bucket
index was uploaded. cortex_compactor_oldest_partition_offset covers a
block only once it has been planned into a partition group, so a block
that is never planned is invisible to it. Blocks marked for deletion or
for no compaction are excluded, and upload time is used rather than the
block's own time range so that late or backfilled samples do not read as
a backlog.
The bucket index entry carries the block's compaction level to support
this. Entries are copied forward rather than re-read from meta.json, so
an entry written before the field existed reports an unknown level and
is skipped. UpdateIndex returns the set of blocks marked for no
compaction, which the index does not carry, in place of the count that
was derived from the same listing.
Signed-off-by: Alex Le <leqiyue@amazon.com>
* Compactor: reference the PR number in the CHANGELOG entries
Signed-off-by: Alex Le <leqiyue@amazon.com>
---------
Signed-off-by: Alex Le <leqiyue@amazon.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@
3
3
## master / unreleased
4
4
5
5
*[CHANGE] Ingester: Make `close_idle_tsdb_timeout` a per-tenant limit (`-limits.close-idle-tsdb-timeout`). `-blocks-storage.tsdb.close-idle-tsdb-timeout` is deprecated and will be removed in v1.24.0. A positive `close_idle_tsdb_timeout` must now be at least `query_store_after` when `query_ingesters_within` is 0. #7813
6
+
*[CHANGE] Compactor: Add the `time_range_milliseconds` label to `cortex_compactor_remaining_planned_compactions` and `cortex_compactor_oldest_partition_offset`, reporting them per compaction time range instead of summed over all of them. #7959
6
7
*[FEATURE] Ruler: Add experimental support for federated rule groups. A rule group listing tenants in its `source_tenants` field is evaluated against those tenants while the resulting series and alerts are written to the tenant owning the rule group. Enabled with `-ruler.enable-federated-rules` (requires `-tenant-federation.enabled`), and restricted to selected tenants with `-ruler.allowed-federated-tenants` and `-ruler.disallowed-federated-tenants`. #7828
7
8
*[FEATURE] Distributor: Add experimental OTLP metrics ingestion over gRPC (`opentelemetry.proto.collector.metrics.v1.MetricsService/Export`) on the gRPC server port. Enable it with `-distributor.otlp.grpc-enabled`. The tenant is read from the `X-Scope-OrgID` gRPC metadata, and the request size is limited by `-server.grpc-max-recv-msg-size-bytes`. #7873
8
9
*[FEATURE] Storage: Add support for Alibaba Cloud OSS as a backend for blocks, ruler, and alertmanager storage. Configured via `-<prefix>.oss.*` flags with `backend: oss`. #7907
@@ -24,6 +25,7 @@
24
25
*[ENHANCEMENT] Querier: Add `-querier.pool-iterator-batches-buf` flag to pool mergeIterator scratch buffers via sync.Pool, reducing per-iterator memory allocation. #7765
25
26
*[ENHANCEMENT] Upgrade promql-engine to latest. #7841
26
27
*[ENHANCEMENT] Ruler: Add new limit `-ruler.list-rules-max-rules` on the total number of rules returned by the Prometheus ListRules API. Responses exceeding the limit are truncated on a rule group boundary and return a `groupNextToken` for retrieving the remaining groups. A rule group is never split, so a single group larger than the limit is still returned whole. Defaults to 0, which is unlimited. #7785
28
+
*[ENHANCEMENT] Compactor: Add the `cortex_compactor_oldest_level_1_block_offset_seconds` metric, reporting per tenant how long ago the oldest level 1 block still listed in the bucket index was uploaded. Blocks marked for deletion or for no compaction are excluded. The bucket index entry now carries the block's compaction level; an entry written before this reports an unknown level and is skipped. #7959
27
29
*[BUGFIX] Update prometheus alertmanager version to v0.34.1 to apply upstream inhibit rule bug fixes. #7877
28
30
*[BUGFIX] Tenant Federation: Fix regex tenant federation not working in single binary mode, and failing with `multiple org IDs present` when a matched tenant ID contains regex metacharacters and also matches other tenants as a regex. #7869
29
31
*[BUGFIX] Query Frontend: Fix the data selection time window computed for an instant query sent without a `time` parameter. The default evaluation time was passed to `util.ParseTimeParam` in milliseconds, but that helper formats the default and parses it as seconds, so the value overflowed `UnixNano()` and wrapped to a timestamp decades away from `now`. This made the `data_select_min_time` and `data_select_max_time` query stats wrong, and stopped the `time_window` query attribute of query priority and query rejection from matching such queries correctly. #7880
Copy file name to clipboardExpand all lines: docs/guides/partitioning-compactor.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,4 +47,6 @@ Note: `compactor.partition-series-count` is using sum of series count of all par
47
47
-`cortex_compactor_group_partition_count`: can be used to keep track of how many partitions being compacted for each time range.
48
48
-`cortex_compactor_group_compactions_not_planned_total`: can be used to alarm any compaction was failed to be planned due to error.
49
49
-`cortex_compact_group_compaction_duration_seconds`: can be used to monitor compaction duration of each time range compactions.
50
-
-`cortex_compactor_oldest_partition_offset`: can be used to monitor when was the oldest compaction that is still not completed.
50
+
-`cortex_compactor_oldest_partition_offset`: can be used to monitor when was the oldest compaction that is still not completed. The `time_range_milliseconds` label is the compaction time range, so an alert can target one range on its own.
51
+
-`cortex_compactor_remaining_planned_compactions`: can be used to monitor the compaction backlog, per compaction time range in the `time_range_milliseconds` label.
52
+
-`cortex_compactor_oldest_level_1_block_offset_seconds`: can be used to monitor how long the oldest block the ingesters uploaded has been waiting for the smallest range compaction, whether or not it has been planned into a partition group. A block marked for deletion or for no compaction is not counted.
Help: "Time in seconds between now and the oldest created partition group not completed. Only available with shuffle-sharding strategy and partitioning compaction strategy",
116
-
}, commonLabels)
116
+
Help: "Time in seconds between now and the oldest created partition group not completed, per compaction time range. Only available with shuffle-sharding strategy and partitioning compaction strategy",
Help: "Time in seconds between now and the upload time of the oldest level 1 block still listed in the tenant's bucket index, excluding blocks marked for deletion. 0 when the tenant has no such block.",
level.Debug(userLogger).Log("msg", "partition group info with oldest creation time", "partitioned_group_id", oldestPartitionGroup.PartitionedGroupID, "creation_time", oldestPartitionGroup.CreationTimeString())
level.Debug(userLogger).Log("msg", "partition group info with oldest creation time", "time_range", timeRange, "partitioned_group_id", group.PartitionedGroupID, "creation_time", group.CreationTimeString())
0 commit comments