# Cortex v1.22.0

2026-11-20 · [元のリリースノート](https://github.com/cortexproject/cortex/releases/tag/v1.22.0) · [全体のまとめ](https://ratatosk.io/ja/releases/cortex/v1.22.0)

セキュリティ 8 · 破壊的変更 20 · 非推奨 3 · 重大な修正 37 · 機能・改善 41 · 依存関係の更新 9 · その他の変更 28

## セキュリティ (8)

### gRPC の非正規パスによる認可回避の修正

- 影響対象: パスベースの認可、正規パスの拒否ルール、フォールバックの許可ルールを設定した gRPC サーバーを公開している Cortex デプロイメント
- [CVE-2026-33186](https://www.cve.org/CVERecord?id=CVE-2026-33186), [GHSA-p77j-4mvh-x3m3](https://github.com/advisories/GHSA-p77j-4mvh-x3m3)

このリリースより前は、先頭のスラッシュがない `:path` を持つ生の HTTP/2 リクエストが、正規パスの拒否ルールを回避してハンドラーに到達する可能性がありました。このようなリクエストは、認可インターセプターやハンドラーに到達する前に `codes.Unimplemented` エラーで拒否されるようになりました。

> * [ENHANCEMENT] Upgrade gRPC from v1.71.2 to v1.79.3 to address CVE-2026-33186. #7460 #7463
> - **Dependency and runtime updates**: Go 1.27.3, Prometheus v3.9.1, Alertmanager v0.33.0, gRPC v1.79.3, and distroless base images for the container images.

### Go `crypto/x509` の信頼されない中間証明書に対する検証修正

- 影響対象: `crypto/x509` による証明書検証を使用する Cortex デプロイメント (推定)
- [CVE-2026-111943](https://www.cve.org/CVERecord?id=CVE-2026-111943)

信頼できると見なされなくなった既知の中間証明書を指定して `Verify` を呼び出すと、エラーが返されるようになりました。

> * [ENHANCEMENT] Update Go version to 1.27.3, which includes security fixes to the `crypto/x509` package (CVE-2026-111943). #7906 #7923

### Cortex による空の署名キー項目の拒否

- 影響対象: `-distributor.sign-write-requests-keys` の設定

余分なカンマや末尾のカンマがあると、以前は空の署名キーが作られ、HMAC によるストリームプッシュ認証が偽造可能な署名へと格下げされていました。現在は、この設定ミスがあるとプロセスの起動時にエラーになります。

> * [BUGFIX] Security: Reject empty entries in `-distributor.sign-write-requests-keys` caused by stray or trailing commas (e.g. `newkey,`). Previously these were silently accepted and produced an empty signing key, which downgraded HMAC stream-push authentication to a forgeable signature. Misconfigured flags now fail at process startup; audit your configs before upgrading. #7587

### [セキュリティかどうか不明] ランタイムイメージを `gcr.io/distroless/static-debian12` に切り替え

- 影響対象: Cortex、query-tee、thanosconvert、test-exporter のランタイムコンテナイメージを使用するデプロイメント

従来の `alpine:3.23` イメージには、シェルとパッケージマネージャーが含まれていました。新しいイメージにはシェル、パッケージマネージャー、busybox は含まれませんが、CA 証明書は引き続き含まれます。

> * [ENHANCEMENT] Upgraded container base images from `alpine:3.23` to `gcr.io/distroless/static-debian12`, reducing image size and attack surface. #7637

### [セキュリティかどうか不明] Query Frontend ログへの `X-Grafana-User` の記録

- 影響対象: `[dataproxy] send_user_header` が有効な Grafana データソースのプロキシリクエスト

リクエストに `X-Grafana-User` が含まれる場合、その値がクエリ統計、スロークエリ、クエリリクエストの各ログに記録されます。Cortex 側の設定変更は不要です。

> * [ENHANCEMENT] Query Frontend: Log `X-Grafana-User` header in query stats, slow query, and query request logs when Grafana's `send_user_header` is enabled. #7799

### `Push` の早期リターン時における TSDB appender の解放

- 影響対象: 順序が前後したラベルセットを処理する Ingester 構成

順序が前後したラベルセットの場合など、`Push` が早期リターンすると、リクエストごとに TSDB head のシリーズ参照、mmap されたチャンク、保留状態がリークし、cortex_ingester_tsdb_head_active_appenders が際限なく増加していました。

> * [BUGFIX] Ingester: Release the TSDB appender on every early-return path in `Push` (e.g. out-of-order label set) by deferring `Rollback`. Previously such requests leaked TSDB head series references, mmap'd chunks and pending state per request, causing the `cortex_ingester_tsdb_head_active_appenders` gauge to grow unbounded. #7528

### [セキュリティかどうか不明] Ingester のゼロカウント浮動小数点ヒストグラムによるパニックの修正

- 影響対象: 浮動小数点のネイティブヒストグラムを取り込む構成

ゼロカウントの浮動小数点ヒストグラムは、staleness marker や空のヒストグラムなどの場合に整数デコーダーへ渡され、同期 gRPC `Push` の処理中に Ingester がクラッシュする可能性がありました。現在は浮動小数点デコーダーを使うため、このパニックを起こさずに取り込めます。

> * [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

### テナント別設定でのファイル参照型 HTTP ヘッダーの禁止

- 影響対象: `-alertmanager.enable-api=true` を指定し、`http_config.http_headers.<NAME>.files` を使用するテナント別 Alertmanager 設定
- GHSA-hq3h-j634-grmc

通知時にファイルパスが読み取られ、その内容がテナントの管理する URL に送信されていました。そのため、Alertmanager API にアクセスできるテナントが、Alertmanager プロセスから読み取り可能なファイルを漏えいさせる可能性がありました。`Values` と `Secrets` は引き続き使用できます。

> * [BUGFIX] Alertmanager: Tighten per-tenant config validation to reject additional file-based settings. #7767

## 破壊的変更 (20)

### Ruler の評価遅延設定の削除

- 影響対象: `-ruler.evaluation-delay-duration` または `ruler_evaluation_delay_duration` のランタイムオーバーライドを使用する Cortex の設定
- 必要な対応: 非推奨のフラグや上限、および `ruler_evaluation_delay_duration` のランタイムオーバーライドがないこと。置き換え先は `-ruler.query-offset` / `ruler_query_offset`。

削除されたフラグを指定してプロセスを起動すると、起動に失敗します。残存するランタイムオーバーライドがあると、起動に失敗するか、稼働中のプロセスで再読み込みに失敗します。再読み込みに失敗した場合、最後に正常に読み込まれたオーバーライドが保持され、`cortex_runtime_config_last_reload_successful` は `0` に設定されます。query-offset の値は、2つの値のうち大きい方を使わなくなりました。

根拠: “Cortex decodes the runtime config strictly, so a leftover `ruler_evaluation_delay_duration` override makes the runtime config fail to load: Cortex **exits at startup** (`module failed`, `module=runtime-config`), and on an already-running process every reload fails, pinning the last good overrides and dropping `cortex_runtime_config_last_reload_successful` to 0.” https://github.com/cortexproject/cortex/releases/tag/v1.22.0

> - **Removed flags and stricter config checks**: Cortex removes the deprecated `-ruler.evaluation-delay-duration`, `-querier.ingester-metadata-streaming`, and `-<prefix>.fifocache.size` flags, and eight flags that already had no effect, such as `-querier.iterators`. Passing a removed flag stops Cortex at startup, and so does a leftover `ruler_evaluation_delay_duration` in a runtime config. `query_ingesters_within` must now be less than `-blocks-storage.tsdb.close-idle-tsdb-timeout`, and a config that sets them equal stops Cortex at startup. Read the `[CHANGE]` entries below before you upgrade.

### FIFOCache の `size` 設定の削除

- 影響対象: `-<prefix>.fifocache.size` または `size` YAML フィールドを使用する FIFOCache の設定
- 必要な対応: `size` のみではなく、`-<prefix>.fifocache.max-size-items` または `-<prefix>.fifocache.max-size-bytes` を設定した構成

`size` のみで設定されたキャッシュは、容量なしで起動するようになりました。

根拠: “Remove the deprecated `-<prefix>.fifocache.size` flag and its `size` YAML field (deprecated in 1.1.0). Use `-<prefix>.fifocache.max-size-items` or `-<prefix>.fifocache.max-size-bytes`; a cache configured only via `size` now starts with no capacity.” https://github.com/cortexproject/cortex/releases/tag/v1.22.0

> - **Removed flags and stricter config checks**: Cortex removes the deprecated `-ruler.evaluation-delay-duration`, `-querier.ingester-metadata-streaming`, and `-<prefix>.fifocache.size` flags, and eight flags that already had no effect, such as `-querier.iterators`. Passing a removed flag stops Cortex at startup, and so does a leftover `ruler_evaluation_delay_duration` in a runtime config. `query_ingesters_within` must now be less than `-blocks-storage.tsdb.close-idle-tsdb-timeout`, and a config that sets them equal stops Cortex at startup. Read the `[CHANGE]` entries below before you upgrade.

### Ruler の評価遅延設定をクエリーオフセットに置き換え

- 影響対象: 削除されたフラグまたはテナントごとのランタイム設定フィールドを使用するRulerデプロイメント
- 必要な対応: アップグレード前にランタイム設定全体を対象として `grep -r ruler_evaluation_delay_duration` で検索

以前は2つの設定値のうち大きい方が有効なオフセットでしたが、現在は `RulerQueryOffset` の値がそのまま使われます。`ruler_evaluation_delay_duration` の設定が残っていると、起動に失敗するか、稼働中のプロセスではリロードのたびに失敗します。その場合、直近で正常に適用されたオーバーライドが保持され、`cortex_runtime_config_last_reload_successful` は `0` に設定されます。

> * [CHANGE] Ruler: Remove the deprecated `-ruler.evaluation-delay-duration` flag and its `ruler_evaluation_delay_duration` per-tenant limit. Use `-ruler.query-offset` / `ruler_query_offset`, which no longer takes the higher of the two values. Cortex decodes the runtime config strictly, so a leftover `ruler_evaluation_delay_duration` override makes the runtime config fail to load: Cortex **exits at startup** (`module failed`, `module=runtime-config`), and on an already-running process every reload fails, pinning the last good overrides and dropping `cortex_runtime_config_last_reload_successful` to 0. Run `grep -r ruler_evaluation_delay_duration` over your runtime configs before upgrading. #7792

### FIFO キャッシュの容量設定の削除

- 影響対象: `-<prefix>.fifocache.size` または `size` YAML フィールドで設定されたキャッシュ

以前は `size` でキャッシュ容量を設定できました。この設定が削除されたため、この設定だけで構成されたキャッシュは容量未設定で起動し、`neither max-size-bytes nor max-size-items is set` とログに記録されます。

根拠: “NewFifoCache no longer copies it into `MaxSizeItems`, so a cache configured only through `size` now starts with no capacity (and already logs "neither max-size-bytes nor max-size-items is set").” https://github.com/cortexproject/cortex/pull/7791

> * [CHANGE] Remove the deprecated `-<prefix>.fifocache.size` flag and its `size` YAML field (deprecated in 1.1.0). Use `-<prefix>.fifocache.max-size-items` or `-<prefix>.fifocache.max-size-bytes`; a cache configured only via `size` now starts with no capacity. #7791

### メタデータ API で常にストリーミング RPC を使用

- 影響対象: `-querier.ingester-metadata-streaming`、`ingester_metadata_streaming`、または `ingester_streaming` を使用する querier の構成

以前は、`-querier.ingester-metadata-streaming` と `ingester_metadata_streaming` がメタデータのストリーミングを制御し、デフォルト値は `true` でした。また、非公開の `ingester_streaming` フィールドも受け付けていました。

> * [CHANGE] Querier: Remove the deprecated `-querier.ingester-metadata-streaming` flag and its `ingester_metadata_streaming` YAML field (deprecated in 1.18.0, default `true`). Streaming RPCs are now always used for the metadata APIs. Also removes the dead hidden `ingester_streaming` YAML field left over from `-querier.ingester-streaming`. #7791

### Query Frontend のスロークエリログのフィールド名を `time_taken_ms` に変更

- 影響対象: Query Frontend のスロークエリログ (推定)

以前は、ログで `time_taken` が使われ、値は `1s` のような期間を表す文字列でした。現在は `time_taken_ms` が使われ、1 秒を `1000` とするように、値はミリ秒単位の数値になっています。

根拠: “Rename `time_taken` field to `time_taken_ms` and make it output millisecond count, so sorting and filtering on the field could be done.” https://github.com/cortexproject/cortex/pull/7649

> * [ENHANCEMENT] Query Frontend: Rename `time_taken` field to `time_taken_ms` and make it return millisecond count. #7649

### 読み取りエラー時のパーティション化グループファイル上書きの修正

- 影響対象: パーティション化グループ情報を使用するコンパクター構成

S3 のスロットリングなどによる一時的な `ReadPartitionedGroupInfo` エラーが握りつぶされ、既存のパーティション化グループファイルが新しい `CreationTime` で上書きされることがありました。今後は `ErrorPartitionedGroupInfoNotFound` 以外のエラーをログに記録して作成を中止するため、次のコンパクションサイクルで再試行されるまで既存ファイルは変更されません。

根拠: “The fix captures the error and, if it is not `ErrorPartitionedGroupInfoNotFound`, logs it and returns — aborting creation so the group will be retried in the next compaction cycle.” https://github.com/cortexproject/cortex/pull/7766

> * [BUGFIX] Compactor: Properly handle error from ReadPartitionedGroupInfo in UpdatePartitionedGroupInfo. #7766

### 正規表現によるテナントフェデレーションの起動時検出を修正

- 影響対象: 正規表現によるテナントフェデレーションを使用する構成

最初のティックより前に届いたクエリは、空のユーザーリストと照合されていたため、テナントが誤って解決されていました。起動時にクエリの受け付けを開始する前にユーザーを検出するようになりました。初回の検出に失敗した場合は、空のリストを使って処理を続けるのではなく、サービスの起動に失敗します。

根拠: “The service must fail to start rather than serving queries against an empty user list.” https://github.com/cortexproject/cortex/pull/7811

> * [BUGFIX] Tenant Federation: Fix regex tenant federation resolving to an empty user list right after startup. #7811

### Querier のメタデータストリーミング設定の削除

- 影響対象: `-querier.ingester-metadata-streaming`、`ingester_metadata_streaming`、または `ingester_streaming` を使用する Querier の設定

メタデータ API は常にストリーミング RPC を使用するようになりました。以前は、デフォルト値が `true` のオプションでストリーミングを設定できました。削除されたフラグを渡すと、Cortex は起動時に停止します。

根拠: “Remove the deprecated `-querier.ingester-metadata-streaming` flag and its `ingester_metadata_streaming` YAML field (deprecated in 1.18.0, default `true`). Streaming RPCs are now always used for the metadata APIs. Also removes the dead hidden `ingester_streaming` YAML field left over from `-querier.ingester-streaming`.” https://github.com/cortexproject/cortex/releases/tag/v1.22.0

> - **Removed flags and stricter config checks**: Cortex removes the deprecated `-ruler.evaluation-delay-duration`, `-querier.ingester-metadata-streaming`, and `-<prefix>.fifocache.size` flags, and eight flags that already had no effect, such as `-querier.iterators`. Passing a removed flag stops Cortex at startup, and so does a leftover `ruler_evaluation_delay_duration` in a runtime config. `query_ingesters_within` must now be less than `-blocks-storage.tsdb.close-idle-tsdb-timeout`, and a config that sets them equal stops Cortex at startup. Read the `[CHANGE]` entries below before you upgrade.

### Cortexで非推奨の無効なCLIフラグ8個を削除

- 影響対象: `-querier.ingester-streaming`、`-querier.iterators`、`-querier.batch-iterators`、`-querier.query-store-for-labels-enabled`、`-querier.max-outstanding-requests-per-tenant`、`-query-scheduler.max-outstanding-requests-per-tenant`、`-blocks-storage.tsdb.wal-compression-enabled`、`-ingester.max-series-per-query` のいずれかを含む Cortex のコマンドライン
- 必要な対応: アップグレード前のコマンドラインからのこれらのフラグの削除

これらのフラグは、少なくとも2回のマイナーリリースにわたり効果がありませんでした。いずれかを指定すると、現在はCortexが起動時に停止します。

根拠: “All of them were flag-only (no YAML config option) and already had no effect, so the only impact is that passing them now fails at startup.” https://github.com/cortexproject/cortex/releases/tag/v1.22.0

> - **Removed flags and stricter config checks**: Cortex removes the deprecated `-ruler.evaluation-delay-duration`, `-querier.ingester-metadata-streaming`, and `-<prefix>.fifocache.size` flags, and eight flags that already had no effect, such as `-querier.iterators`. Passing a removed flag stops Cortex at startup, and so does a leftover `ruler_evaluation_delay_duration` in a runtime config. `query_ingesters_within` must now be less than `-blocks-storage.tsdb.close-idle-tsdb-timeout`, and a config that sets them equal stops Cortex at startup. Read the `[CHANGE]` entries below before you upgrade.

### クエリインジェスターのタイムアウトをアイドル TSDB のタイムアウトより短く設定

- 影響対象: `query_ingesters_within` が正の値で、`close_idle_tsdb_timeout` 以上に設定された Querier およびランタイム設定（テナントごとのオーバーライドを含む）
- 必要な対応: `close_idle_tsdb_timeout` を最大の `query_ingesters_within` の値より大きく設定するか、アイドル状態の TSDB を閉じないよう `0` に設定すること

以前のリリースでは、同じ値が許可され、設定方法として案内されていました。現在は、同じ値にすると Cortex は起動時に終了します。テナントのオーバーライドに問題がある場合、ランタイム設定の読み込みに失敗します。再読み込みに失敗した場合は、最後に正常に読み込まれたオーバーライドが保持され、`cortex_runtime_config_last_reload_successful` は `0` に設定されます。

根拠: “The check also runs on every per-tenant override in the runtime config (on the `all`, `distributor`, `querier` and `ruler` targets), so a single tenant override that sets `query_ingesters_within` at or above `close_idle_tsdb_timeout` makes the whole runtime config fail to load” https://github.com/cortexproject/cortex/releases/tag/v1.22.0

> - **Removed flags and stricter config checks**: Cortex removes the deprecated `-ruler.evaluation-delay-duration`, `-querier.ingester-metadata-streaming`, and `-<prefix>.fifocache.size` flags, and eight flags that already had no effect, such as `-querier.iterators`. Passing a removed flag stops Cortex at startup, and so does a leftover `ruler_evaluation_delay_duration` in a runtime config. `query_ingesters_within` must now be less than `-blocks-storage.tsdb.close-idle-tsdb-timeout`, and a config that sets them equal stops Cortex at startup. Read the `[CHANGE]` entries below before you upgrade.

### クエリーの時間範囲設定をテナントごとの `limits` に移行

- 影響対象: querier の設定、フラグ、またはテナント別 `limits` で `query_ingesters_within`、`query_store_after`、`shuffle_sharding_ingesters_lookback_period` を設定している環境
- 削除予定: v1.24.0

これらの設定は以前は `querier` ブロックにあり、`-querier.*` フラグを使用していました。旧フィールド名とフラグ名も引き続き使えますが、警告が記録され、`deprecated_flags_inuse_total` が増加します。期間には `model.Duration` が使われ、最小単位は 1 ms です。

根拠: “The settings move from the `querier` block to `limits`, and their flags from `-querier.*` to `-limits.*`. The old YAML fields and flags still work, but are deprecated and will be removed in v1.24.0: using them logs a warning and increments `deprecated_flags_inuse_total`.” https://github.com/cortexproject/cortex/releases/tag/v1.22.0

> - **Per-tenant query time ranges and HA failover timeout**: `query_ingesters_within`, `query_store_after`, and `shuffle_sharding_ingesters_lookback_period` move from the `querier` block to `limits`, and `-distributor.ha-tracker.failover-timeout` becomes a per-tenant limit. The 1.21 names keep working until v1.24.0 and log a warning.

### Cortex による非推奨の no-op コマンドラインフラグの削除

- 影響対象: 列挙された8個のフラグのいずれかをコマンドラインで引き続き指定しているデプロイメント
- 必要な対応: アップグレード前に、列挙された非推奨フラグをコマンドラインから削除

これらのフラグは以前から効果がありませんでしたが、今後はいずれかを指定すると起動に失敗します。

> * [CHANGE] Remove deprecated CLI flags that have been no-ops for at least two minor releases. All of them were flag-only (no YAML config option) and already had no effect, so the only impact is that passing them now fails at startup. Remove them from your command lines before upgrading. #7790
>   - `-querier.ingester-streaming` (deprecated in 1.17.0)
>   - `-querier.iterators` (deprecated in 1.17.0)
>   - `-querier.batch-iterators` (deprecated in 1.17.0)
>   - `-querier.query-store-for-labels-enabled` (deprecated in 1.18.0)
>   - `-querier.max-outstanding-requests-per-tenant` (deprecated in 1.18.0; use `-frontend.max-outstanding-requests-per-tenant`)
>   - `-query-scheduler.max-outstanding-requests-per-tenant` (deprecated in 1.18.0; use `-frontend.max-outstanding-requests-per-tenant`)
>   - `-blocks-storage.tsdb.wal-compression-enabled` (deprecated in 1.19.0; use `-blocks-storage.tsdb.wal-compression-type`)
>   - `-ingester.max-series-per-query` (a chunks-storage limit, ignored since blocks storage; use `-querier.max-fetched-series-per-query`)

### クエリの時間範囲設定をテナントごとの `limits` に移行

- 影響対象: `query_ingesters_within`、`query_store_after`、または `shuffle_sharding_ingesters_lookback_period` を使用する Querier の設定
- 必要な対応: 同一の YAML ファイル内またはコマンドライン上で、旧名と新名に異なる値を設定しないこと
- 削除予定: v1.24.0

旧来の `querier` の YAML フィールドと `-querier.*` フラグは引き続き使用できますが、非推奨を知らせる警告が出力され、`deprecated_flags_inuse_total` が増加します。コマンドラインフラグは YAML の設定より優先されます。1ms 未満の期間はサポートされません。

> * [CHANGE] Querier: Make query time range configurations per-tenant: `query_ingesters_within`, `query_store_after`, and `shuffle_sharding_ingesters_lookback_period`. Uses `model.Duration` instead of `time.Duration` to support serialization but has minimum unit of 1ms (nanoseconds/microseconds not supported). The settings move from the `querier` block to `limits`, and their flags from `-querier.*` to `-limits.*`. The old YAML fields and flags still work, but are deprecated and will be removed in v1.24.0: using them logs a warning and increments `deprecated_flags_inuse_total`. As before, a flag on the command line wins over the YAML file, whether it uses the old or the new name. Setting the old and the new name to different values in the same place, both in the YAML file or both on the command line, fails at startup. #7160 #7323 #7919

### Cortex のクエリおよび TSDB タイムアウト検証の厳格化

- 影響対象: 正の `query_ingesters_within` が `close_idle_tsdb_timeout` 以上の設定、またはこれらの制約やクエリ範囲の制約に違反するテナントオーバーライド
- 必要な対応: 設定とランタイムオーバーライドで最大の `query_ingesters_within` より `close_idle_tsdb_timeout` を大きく設定すること、またはアイドル状態の TSDB を閉じないよう `0` に設定すること

以前は、正のタイムアウト値が等しくても受け入れられ、クエリ範囲のチェックはテナントオーバーライドに適用されていませんでした。現在は、値が等しいと起動に失敗します。また、無効なテナントオーバーライドによって起動またはランタイム設定の再読み込みが失敗することもあります。その場合、最後に正常だったオーバーライドが維持され、`cortex_runtime_config_last_reload_successful` は `0` に設定されます。

> * [CHANGE] Querier: `query_ingesters_within` must now be strictly less than `-blocks-storage.tsdb.close-idle-tsdb-timeout` when both are positive. Earlier releases did not check this, and documented the two being equal as valid, so a config that sets them equal now makes Cortex **exit at startup** with `invalid query routing config: tenant default: query_ingesters_within (6h50m0s) must be less than close_idle_tsdb_timeout (6h50m0s)`. The check also runs on every per-tenant override in the runtime config (on the `all`, `distributor`, `querier` and `ruler` targets), so a single tenant override that sets `query_ingesters_within` at or above `close_idle_tsdb_timeout` makes the whole runtime config fail to load: Cortex exits at startup, and on an already-running process every reload fails, pinning the last good overrides and dropping `cortex_runtime_config_last_reload_successful` to 0. Before upgrading, raise `close_idle_tsdb_timeout` above the largest `query_ingesters_within` in your config and runtime overrides, or set it to 0 to disable closing idle TSDBs. The existing checks that `query_store_after` is less than `query_ingesters_within`, and that `shuffle_sharding_ingesters_lookback_period` is at least `query_store_after`, now also apply to per-tenant overrides. #7323

### Alertmanager 起動時の旧形式ローカル状態ファイル移行の削除

- 影響対象: 1.9.0 より前のバージョンからアップグレードする、永続化されたローカル状態ディレクトリを持つ Alertmanager のデプロイメント

以前は、起動時に旧形式のローカル状態ファイルをテナントごとのディレクトリに移動していました。このリリースへ直接アップグレードする前に、中間リリースで移行を実行する必要があります。

> * [CHANGE] Alertmanager: Remove the obsolete startup migration of local state files into per-tenant directories (scheduled for removal in 1.11.0). Upgrading from a release older than 1.9.0 with a persisted local state directory now requires upgrading to an intermediate release first, so the migration can run. #7513

### Silence の作成での `createdBy` 必須化

- 影響対象: HTTP API 経由で Silence を作成するクライアント

Alertmanager の Swagger 生成 API モデルで、`Silence` が別々の型に分割されました。

根拠: “- `createdBy` field is now required when creating a silence via the HTTP API” https://github.com/cortexproject/cortex/pull/7462

> * [ENHANCEMENT] Upgrade prometheus alertmanager version to v0.32.1. #7462

### RPM および deb パッケージのインストール先の修正

- 影響対象: パッケージに付属する systemd ユニットを使用する RPM または deb パッケージのインストール

以前は、バイナリは `/usr/local/bin/cortex` に、ユニットは `/etc/systemd/system/cortex.service` にインストールされていました。現在は、バイナリは `/usr/bin/cortex` にインストールされます。ユニットは RPM パッケージでは `/usr/lib/systemd/system` に、deb パッケージでは `/lib/systemd/system` にインストールされ、`/usr/bin/cortex` を実行します。

> * [BUGFIX] Packaging: Fix RPM and deb packages to install the binary to `/usr/bin`, install the systemd unit to the correct system path (`/usr/lib/systemd/system` for RPM, `/lib/systemd/system` for deb), and mark the sysconfig/default env file as a config file so it is not overwritten on upgrade. #7445

### シャットダウン中のテナント作成を防ぐマルチテナント Alertmanager

- 影響対象: マルチテナント Alertmanager のフォールバックによるテナント作成

シャットダウンとフォールバックリクエストが競合すると、シャーディングされた gRPC の `HandleRequest` 経路や、シャットダウン直前にサービス状態チェックを通過した場合も含め、既存インスタンスの停止後に Alertmanager が新規作成され、ゴルーチンがリークして HTTP 200 が返ることがありました。現在は新しいインスタンスを作成せず、リクエストに HTTP 503 を返します。

根拠: “The shutdown-vs-lazy-create hole is independent: `stopping()` stops only the alertmanagers present in the map when it runs, and `serveRequest` can be reached without `ServeHTTP`'s service-state check (the gRPC `HandleRequest` path when sharding is enabled) or after passing that check just before the state transition. A request losing that race would upload a config, register a new Alertmanager **after** shutdown stopped the others, return 200 from a shutting-down process, and leak the new instance's goroutines.” https://github.com/cortexproject/cortex/pull/7618

> * [BUGFIX] Alertmanager: Fix data race between ApplyConfig's dispatcher/inhibitor startup and Stop during config reload and shutdown, and reject lazy tenant creation after shutdown begins. #7618

### テナントごとの Alertmanager 検証でグローバルな `mattermost_webhook_url_file` を拒否

- 影響対象: グローバルな `mattermost_webhook_url_file` 設定を含むテナントごとの Alertmanager 設定

以前は、Mattermost レシーバーのない設定は、この設定が一度も読み取られないにもかかわらず受け入れられていました。Mattermost レシーバーのある設定は、すでに拒否されていました。

根拠: “Not exploitable today. When a mattermost receiver is present, upstream copies the global value into the receiver's `WebhookURLFile` during unmarshal, which runs before validation, so the per-receiver check already rejected it. With no mattermost receiver the value was accepted but never read.” https://github.com/cortexproject/cortex/pull/7768

> * [BUGFIX] Alertmanager: Reject the global `mattermost_webhook_url_file` setting in per-tenant configs, consistent with every other global `*_file` setting. #7768

## 非推奨 (3)

### HA トラッカーのフェイルオーバータイムアウトのテナントごとの設定

- 影響対象: ディストリビューターの HA トラッカーのフェイルオーバータイムアウトを設定している構成
- 削除予定: v1.24.0

従来、タイムアウトは `distributor.ha_tracker.ha_tracker_failover_timeout` でグローバルに設定されていましたが、現在は `limits.ha_tracker_failover_timeout` を使ってテナントごとに設定できます。`-distributor.ha-tracker.failover-timeout` フラグとデフォルト値の 30s は変更ありません。古い YAML フィールドも引き続き使用できますが、非推奨です。

> - **Per-tenant query time ranges and HA failover timeout**: `query_ingesters_within`, `query_store_after`, and `shuffle_sharding_ingesters_lookback_period` move from the `querier` block to `limits`, and `-distributor.ha-tracker.failover-timeout` becomes a per-tenant limit. The 1.21 names keep working until v1.24.0 and log a warning.

### Ingester の `-blocks-storage.tsdb.max-exemplars` の非推奨化

- 影響対象: `-blocks-storage.tsdb.max-exemplars` に 0 以外の値を設定した Ingester
- 削除予定: v1.24.0

このフラグは、`max_exemplars` が 0 のテナントに対するグローバルなフォールバックとして引き続き使われます。0 以外の値を設定すると、起動時に警告がログに記録され、`deprecated_flags_inuse_total` が増加します。

> * [CHANGE] Ingester: Formally deprecate `-blocks-storage.tsdb.max-exemplars`, scheduled for removal in v1.24.0. Use the per-tenant `max_exemplars` limit instead. The flag still works as the global fallback when `max_exemplars` is 0, but setting it now logs a warning and increments `deprecated_flags_inuse_total`. #7793

### HA Tracker のフェイルオーバータイムアウトにテナントごとの設定を追加

- 影響対象: HA Tracker のデプロイでフェイルオーバータイムアウトを設定している環境、特に `distributor.ha_tracker.ha_tracker_failover_timeout` を使用している環境、またはテナントごとの値が必要な環境
- 削除予定: v1.24.0

これまではタイムアウトは全体で共通で、テナントごとの実行時オーバーライドはできませんでした。従来の YAML フィールドは引き続き使用できますが、警告が記録され、`deprecated_flags_inuse_total` が増加します。従来のフィールドと新しいフィールドに異なる値を設定すると、起動時に失敗します。

> * [CHANGE] HA Tracker: Move `-distributor.ha-tracker.failover-timeout` from a global config to a per-tenant runtime config. The flag name and default value (30s) remain the same. The YAML field moves from `distributor.ha_tracker.ha_tracker_failover_timeout` to `limits.ha_tracker_failover_timeout`. The old field still works, but is deprecated and will be removed in v1.24.0: using it logs a warning and increments `deprecated_flags_inuse_total`. As before, the flag on the command line wins over either YAML field. Setting the old and the new YAML field to different values fails at startup. #7481 #7919

## 重大な修正 (37)

### Querier のキャンセルエラー伝播

- 影響対象: `queryWithRetry` または `labelsWithRetry` を使用する Querier リクエスト (推定)

どちらかの関数をキャンセル済みのコンテキストで呼び出すと、キャンセルを報告せず `(nil, nil)` を返していました。現在は `ctx.Err()` を返します。

> * [BUGFIX] Querier: Fix queryWithRetry and labelsWithRetry returning (nil, nil) on cancelled context by propagating ctx.Err(). #7370

### マージ済みヒストグラムのバケットの`UpperBound`順ソート

- 影響対象: ヒストグラムメトリクスをマージする構成 (推定)

この修正前は、マップからマージ済みヒストグラムのバケットを作成すると、バケットの順序が一定していませんでした。

> * [BUGFIX] Metrics Helper: Fix non-deterministic bucket order in merged histograms by sorting buckets after map iteration, matching Prometheus client library behavior. #7380

### アップグレード時の Cortex 環境ファイルの保持

- 影響対象: `/etc/sysconfig/cortex` を使用する RPM インストール、または `/etc/default/cortex` を使用する deb インストール

この修正以前は、設定ファイルとして指定されていなかったため、RPM または deb のアップグレード時に対応する環境ファイルが通知なく上書きされていました。

> * [BUGFIX] Packaging: Fix RPM and deb packages to install the binary to `/usr/bin`, install the systemd unit to the correct system path (`/usr/lib/systemd/system` for RPM, `/lib/systemd/system` for deb), and mark the sysconfig/default env file as a config file so it is not overwritten on upgrade. #7445

### コンパクターによる古いバケットインデックスメトリクスのクリーンアップ修正

- 影響対象: リングの再バランスによってテナントの所有権が変わるコンパクター構成

リングの再バランスによってテナントがコンパクター間で移動すると、以前の所有者の `cortex_bucket_index_last_successful_update_timestamp_seconds` 系列が新しい所有者の系列とともに残り、バケットインデックスの更新率に関する誤警報が発生していました。コンパクターが所有しなくなったテナントのメトリクスは削除されるようになりました。

> * [BUGFIX] Compactor: Fix stale `cortex_bucket_index_last_successful_update_timestamp_seconds` metric not being cleaned up when tenant ownership changes due to ring rebalancing. This caused false alarms on bucket index update rate when a tenant moved between compactors. #7485 #7487

### テナントフェデレーションの結果キャッシュで一致するテナントを追跡

- 影響対象: `-tenant-federation.regex-matcher-enabled=true` と結果キャッシュを使用するテナントフェデレーション

新しいテナントによって正規表現に一致するテナントの集合が変わると、キャッシュエントリーの期限が切れるまで、そのテナントのデータがキャッシュ結果から抜け落ちることがありました。一致するテナントの集合が変わるとキャッシュキーも変わり、キャッシュエントリーが無効化されるようになりました。正規表現を使用しないユーザーには影響ありません。

> * [BUGFIX] Tenant Federation: Fix result cache returning stale data after a new tenant is added when `-tenant-federation.regex-matcher-enabled=true`. The resolved tenant set is now hashed and included in the cache key so that any change to the matched tenant list automatically invalidates cached entries. Non-regex users are unaffected. #7562

### Ring のトークン競合解決の修正

- 影響対象: `JOINING` 状態の Ring インスタンス (推定)

2 つのインスタンスが同時に参加すると、最初の CAS で競合を検出できず、その後の呼び出しでも再確認されない場合がありました。新規追加または更新として検出されなかった競合インスタンスは、古いトークンを保持し続ける可能性がありました。監視期間中は、各 CAS で競合を確認し、関係するすべてのインスタンスのトークンを解決済みの値に更新するようになりました。

> * [BUGFIX] Ring: Fix ring token conflict resolution only applied to updated instance and make constantly token conflict check during instance observe period. #7554

### Query Frontend によるネイティブヒストグラム結果の並べ替えを修正

- 影響対象: `split_by_interval` を使用する範囲クエリ (推定)

サブインターバルのレスポンスにネイティブヒストグラムしか含まれない場合、`minTime()` は各レスポンスで `-1` を返していたため、誤った順序で並べ替えられ、マージ時にヒストグラムデータが失われる可能性がありました。浮動小数点サンプルがない場合は、最初のヒストグラムのタイムスタンプを使用するようになり、マージ前の時系列順が保たれます。

> * [BUGFIX] Query Frontend: Fix native histogram responses not being handled correctly in `minTime()` sort ordering for split_by_interval merge. #7555

### [表面化しなかった不具合] ルール読み込み前に Ruler が Thanos xfunctions を登録

- 影響対象: Thanos engine xfunctions フラグを有効にした Ruler 構成

以前は、ルールファイルローダーのグローバルパーサーにこれらの関数が含まれていなかったため、S3 またはディスクからルールファイルを読み込むと、`xincrease`、`xrate`、`xdelta` を含む記録ルールが通知なく破棄されていました。

> * [BUGFIX] Ruler: Register xfunctions (xincrease, xrate, xdelta) in the global parser before loading rule files. #7621

### Querier の parquet フォールバックにおけるクエリエラー返却

- 影響対象: parquet queryable フォールバックを使う `LabelValues` または `LabelNames` の Querier 構成

フォールバック経由でどちらかの呼び出しがクエリエラーになった場合、実際のエラーではなく nil を返すことがありました。フォールバックは、そのクエリエラーを呼び出し元に返すようになりました。

> * [BUGFIX] Querier: Fix parquet queryable fallback returning a nil error instead of the actual query error in `LabelValues` and `LabelNames`. #7638

### gRPC DNS ウォッチャーの SRV ターゲット失敗時のエンドポイント保持

- 影響対象: gRPC DNS ウォッチャーの SRV レコード経路を使用する構成

SRV クエリが成功しても、すべてのターゲットの A レコード検索に失敗すると、以前は空の結果が返され、既知のエンドポイントが削除されていました。現在は監視対象ホストの A レコードを検索し、解決できた場合はそのアドレスをウォッチャーのポートと組み合わせて使用します。解決できない場合は、キャッシュ済みのエンドポイントを保持します。

> * [BUGFIX] Fix the gRPC DNS watcher's SRV record path deleting all known endpoints when the SRV query succeeds but every target's A record lookup fails. #7745

### CSVリスト形式のフラグとYAMLフィールドで空値を空リストとして解析

- 影響対象: 空文字列に設定されたCSVリスト形式のフラグまたはYAMLフィールド

以前は、明示的に空の値を指定すると、空のテナント名を1件含むリストとして解析されていました。現在は空のリストとして解析されます。

> * [BUGFIX] Config: Fix CSV-list flags/YAML fields (e.g. `-compactor.enabled-tenants`) treating an explicitly empty string as a one-element list containing an empty tenant name instead of an empty list. #7714

### [表面化しなかった不具合] 正規表現テナントフェデレーションのキャッシュ破損の修正

- 影響対象: `-blocks-storage.users-scanner.cache-ttl` を設定した正規表現テナントフェデレーション

`-blocks-storage.users-scanner.cache-ttl` が設定されていると、リゾルバーのインプレースソートによってスキャナーのキャッシュが破損し、キャッシュの有効期限が切れるまで、同期のたびにフェデレーションクエリの結果からテナントが徐々に失われていました。現在は、ソート前にスキャナーのユーザーリストをコピーします。

> * [BUGFIX] Tenant Federation: Fix regex tenant federation dropping tenants when `-blocks-storage.users-scanner.cache-ttl` is set. The regex resolver sorted the user list returned by the users scanner in place, corrupting the scanner cache and progressively losing tenants on every sync until the cache expired. #7812

### Ingester の強制 head compaction のスキップを失敗として数えない修正

- 影響対象: ブロックの送信と強制 head compaction が重なる可能性のある Ingester 構成

ブロックの送信中に強制 head compaction がスキップされると、`cortex_ingester_tsdb_compactions_failed_total` が増加し、誤報アラートが発生していました。こうしたスキップでは、カウンターが増加しなくなりました。

> * [BUGFIX] Ingester: Don't count a forced head compaction skipped because blocks shipping is in progress as a failure. Previously such skips incremented `cortex_ingester_tsdb_compactions_failed_total`, producing spurious alerts. #7842

### 自動シャーディングによる Parquet 変換失敗の修正

- 影響対象: `-parquet-converter.max-num-columns` を設定した Parquet コンバーターの構成

一意なラベル名が Parquet ライブラリの 32767 列の上限を超える TSDB ブロックは、変換に失敗することがありました。列数の上限を設定すると、変換時にブロックが自動的にシャーディングされます。

> - **Parquet**: Sharded parquet file conversion and querying, an experimental `-parquet-converter.max-num-columns` flag that shards a block with too many label names, a row ranges cache, and a ring status page for the parquet converter.

### Ingester ストリーミングクエリのバッファー保持の修正

- 影響対象: Ingester のストリーミングクエリ経路を使用する Querier/Ingester 構成

Ingester へのクエリ負荷が高い状況でクエリが長時間実行されると、ラベル文字列やチャンクデータによって受信バッファーが保持され、ヒープ使用量が増加することがありました。クエリ経路でこれらのデータをバッファーからコピーするようになり、バッファーを回収できるようになりました。その代わり、短命なメモリー割り当てが増えます。

> * [ENHANCEMENT] Querier/Ingester: Detach ingester series from gRPC buffers to reduce heap. #7670

### PRW 2.0 変換時の Distributor による重複メトリクスメタデータの重複排除

- 影響対象: Prometheus Remote Write 2.0 リクエストを受信する Distributor 構成

従来は、PRW 2.0 の各系列に付随するメタデータが、系列ごとに 1 つの `MetricMetadata` に展開されていました。メタデータも取り込み制限の対象となるため、同じデータでもテナントが設定済みの `-distributor.ingestion-rate-limit` の約 2 倍を消費する可能性がありました。現在、Distributor は変換時に重複するメタデータを重複排除します。

> * [ENHANCEMENT] Distributor: Deduplicate metric metadata when converting PRW 2.0 requests. PRW 2.0 attaches metadata to every series, so a metric family was previously expanded into one `MetricMetadata` per series. #7760

### Prometheus Remote Write 2.0 ハンドラーでテナント ID の解決に失敗した場合の HTTP 401 応答

- 影響対象: Prometheus Remote Write 2.0 リクエスト

応答には、テナント ID の解決エラーがテキストとして含まれます。

> * [BUGFIX] Distributor: Return HTTP 401 Unauthorized when tenant ID resolution fails in the Prometheus Remote Write 2.0 path. #7389

### Compactor のバケットインデックスのクリーンアップ失敗の修正

- 影響対象: バケットインデックスアップデーターを使用する Compactor の構成

古いキャッシュの `Get()` の後に `meta.json` が削除されると、`Attributes()` のエラーによってクリーンアップサイクル全体が失敗することがありました。アップデーターは対象が見つからないエラーとアクセス拒否エラーを処理するようになり、このケースでサイクルが失敗しなくなりました。

> * [BUGFIX] Compactor: Handle not-found and access-denied errors from `Attributes()` in bucket index updater, preventing a stale cached `Get()` from causing the entire cleanup cycle to fail when `meta.json` has been deleted from object storage. #7454

### コンパクション失敗時のインジェスター TSDB クリーンアップ

- 影響対象: TSDB を使用するインジェスター

`tsdb.Open()` の後にコンパクションが失敗すると、`createTSDB` はデータベースを閉じずに戻っていたため、ファイルディスクリプターとメモリーマップされたハンドルがリークし、インジェスターが不安定になるおそれがありました。現在はコンパクションエラーを返す前に TSDB を閉じ、終了処理も失敗した場合は警告をログに記録します。

> * [BUGFIX] Ingester: Close TSDB when compaction fails during `createTSDB`, preventing resource leaks (file descriptors, mmap handles) that could lead to ingester instability. #7560

### スキャン失敗時にユーザー状態を保持するテナントフェデレーションの正規表現リゾルバー

- 影響対象: ユーザー検出スキャンを行うテナントフェデレーションの正規表現リゾルバー (推定)

以前は、ユーザースキャンに失敗すると既知のユーザー一覧がクリアされ、マッチ済みキャッシュもリセットされることがありました。現在はどちらも保持され、キャッシュされた状態から引き続きクエリを解決できます。

> * [BUGFIX] Tenant Federation: Fix regex resolver clearing known users list when user scan fails. #7534

### Ingesterの処理中クエリーカウンターのリーク修正

- 影響対象: リソースベースのクエリー保護を使用しているIngester構成

リソースベースのクエリー保護によってリクエストが拒否された場合、処理中クエリー数のカウンターがリークしていました。

> * [BUGFIX] Ingester: Fix inflight query counter leak when resource-based query protection rejects a request. #7539

### `ActiveQueriedSeriesService` のシャットダウン時のパニック修正

- 影響対象: `ActiveQueriedSeriesService` を使用する Ingester 構成

シャットダウン中に、`ActiveQueriedSeriesService` が `panic: send on closed channel` でパニックすることがありました。`stopping()` 内の重複したチャネルクローズを削除し、ワーカーの終了を `ctx.Done()` 経由で通知します。

> * [BUGFIX] Ingester: Fix `panic: send on closed channel` in `ActiveQueriedSeriesService` on shutdown by removing the redundant channel close in `stopping()` and relying on `ctx.Done()` to signal worker exit. #7533

### コールバックのパニック時における `ring.DoBatch` のクリーンアップ修正

- 影響対象: `ring.DoBatch` を使用する構成

以前はインスタンスごとのコールバックでパニックが発生すると `wg.Done()` が呼ばれず、`wg.Wait()` がブロックされたままになり、クリーンアップが妨げられていました。そのため、コンテキストタイマーとリクエストバッファーが解放されませんでした。パニックの巻き戻し中にも `wg.Done()` が実行されるようになり、クリーンアップでこれらを解放できるようになりました。

> * [BUGFIX] Ring: Fix `DoBatch` never running its cleanup callback when a per-instance callback panics. `wg.Done()` is now deferred, so `wg.Wait()` no longer blocks forever and the context timers and request buffers owned by the cleanup function are released. #7559

### Querier のバケットスキャンにおけるリソースリークの修正

- 影響対象: バケットインデックスを無効にしてバケットスキャン方式のブロックファインダーを使用する Querier デプロイメント

ストレージからテナントが削除された場合や非アクティブになった場合、そのテナントのメタデータフェッチャー、Prometheus レジストリ、ディスク上のメタデータキャッシュがプロセスの存続期間中蓄積し続けていました。各スキャン後に、非アクティブなテナントのリソースが退避されます。`cortex_blocks_meta_synced` ゲージ系列はゼロになり、同じ場所にある store-gateway のブロックデータは保持されます。

> * [BUGFIX] Querier: Fix unbounded resource leak in the bucket-scan blocks finder (used when the bucket index is disabled). Per-tenant metadata fetchers, their Prometheus registries, and on-disk meta caches are now evicted once a tenant is no longer active, instead of being retained for the lifetime of the process. #7573

### テナントごとの Alertmanager の起動・停止時の競合を修正

- 影響対象: テナントごとの Alertmanager インスタンス

リロード中、テナントの無効化中、またはプロセスのシャットダウン中にインスタンスが停止すると、インヒビターとディスパッチャーの初期読み込みが完了する前に `ApplyConfig` が戻ることがありました。その結果、ディスパッチャーの起動との競合や、インヒビターのゴルーチンのリークが発生する可能性がありました。現在は、呼び出しが成功した場合、メモリー上の初期読み込みが完了してから戻るようになりました。

> * [BUGFIX] Alertmanager: Fix data race between ApplyConfig's dispatcher/inhibitor startup and Stop during config reload and shutdown, and reject lazy tenant creation after shutdown begins. #7618

### ディストリビューターの停止時に push worker の goroutine を解放

- 影響対象: `-distributor.num-push-workers` を設定したディストリビューター

ディストリビューターの停止フェーズ中に、非同期エグゼキューターが停止されます。

> * [BUGFIX] Distributor: Release the push worker pool goroutines on shutdown by stopping the async executor during the stopping phase when `-distributor.num-push-workers` is set. #7602

### Query Frontend のクエリ統計にデータ選択時間の境界値を追加

- 影響対象: Cortex Query Frontend の `query` および `query_range` リクエスト

クエリ優先度とクエリ拒否の両方が無効な場合、リクエスト統計に `DataSelectMinTime` と `DataSelectMaxTime` が含まれていませんでした。この構成でも、これらのリクエストで両方の値が設定されるようになりました。

> * [BUGFIX] Query Frontend: Track data selection min and max time of query requests in query stats regardless of whether query priority and query rejection are enabled. #7724

### YAML 検証で空でないルートセクション内の明示的なゼロ値を許容

- 影響対象: 空でないルートセクションに明示的なゼロ値を含む YAML 設定

空のルートセクションは引き続き拒否されます。

> * [BUGFIX] Config: Fix validation of explicit zero values in non-empty YAML root sections, allowing configs such as `flusher: { exit_after_flush: false }` while continuing to reject empty root sections. #7700

### Querier のリクエスト追跡における UTF-8 切り詰め時のパニック修正

- 影響対象: Querier のリクエスト追跡

複数バイトの UTF-8 文字を切り詰めると、残りサイズの上限が 0 または負の場合も含め、パニックが発生することがありました。現在は、切り詰め後も有効な UTF-8 の JSON が生成され、パニックは発生しません。

> * [BUGFIX] Querier: Fix panic due to request tracker truncating multi-byte UTF-8 character #7640

### Azure ストレージのエンドポイントサフィックスの既定値は `blob.core.windows.net`

- 影響対象: `endpoint_suffix` を未設定にした Azure ストレージ (推定)

`endpoint_suffix` が未設定の場合、Cortex が空のサフィックスを渡して無効な FQDN（`<account>.`）を生成していたため、コンポーネントは DNS エラーにより起動時にハングしていました。

> * [BUGFIX] Storage: Default the Azure `endpoint_suffix` to `blob.core.windows.net` instead of empty. Cortex builds the Thanos Azure config directly and bypasses Thanos' default, so an unset suffix produced an invalid FQDN (`<account>.`) and components hung on startup with DNS errors. #5449 #7687

### 一時的な DNS 障害によるワーカー接続切断の防止

- 影響対象: Querier/Query Frontend DNS ウォッチャーが管理する query-frontend/scheduler のワーカー接続

以前は DNS の名前解決に失敗すると、既知のアドレスがすべて消去され、query-frontend/scheduler のワーカー接続が切断されていました。現在、ウォッチャーは DNS の名前解決に失敗しても、以前に解決したアドレスをキャッシュに保持します。

> * [BUGFIX] Querier/Query Frontend: Fix DNS watcher dropping all query-frontend/scheduler worker connections on a transient DNS lookup failure. #7698

### DynamoDB リングの CAS によるトランザクション競合の再試行

- 影響対象: リングの KV ストアとして DynamoDB を使用する構成

以前は、ローリングアップデート中に多数の ingester が参加する場合など、リング更新の競合が発生すると、更新は即座に失敗していました。現在は、CAS ループが最新のリング状態を再読み込みし、変更を再適用して書き込みを再試行します。

> * [BUGFIX] Ring: Fix DynamoDB KV CAS not retrying on transactional conditional check failures. `TransactWriteItems` reports condition failures as `TransactionCanceledException` with a `ConditionalCheckFailed` cancellation reason, which was not recognized as retryable, so any concurrent ring update conflict (e.g. many ingesters joining during a rolling update) failed immediately instead of re-reading and retrying. `TransactionConflict` cancellation reasons are also treated as retryable. #7706

### クライアントがキャンセルしたプッシュに対する Distributor の HTTP 499 返却

- 影響対象: remote-write または OTLP のプッシュリクエストを受信する構成

クライアントがこれらのリクエストをキャンセルした場合（接続を切断した場合や、手前のプロキシまたはロードバランサーがタイムアウトした場合など）、以前は HTTP 500 が返され、サーバー側のエラーとして計上されていました。キャンセルされたリクエストは、サーバー側のエラーとして計上されなくなりました。

> * [BUGFIX] Distributor: Return HTTP 499 (Client Closed Request) instead of 500 when a remote-write or OTLP push is canceled by the client, so client-side cancellations are no longer counted as server-side errors. #7717

### Querier のキャンセル済みクエリに対する HTTP ステータスマッピングの修正

- 影響対象: クライアントがキャンセルしたクエリを処理する Querier

クライアントがクエリをキャンセルし、Querier が gRPC の `codes.Canceled` エラーを受け取った場合、HTTP 500 を返していたため、`cortex_request_duration_seconds` に関する誤った `CortexRequestErrors` アラートが発生していました。現在は、そのクエリに対して HTTP 499 を返します。

> * [BUGFIX] Querier: Fix gRPC `codes.Canceled` errors being mapped to HTTP 500 instead of 499 when a client cancels a query. #7738

### Alertmanager 設定検証時のパニック修正

- 影響対象: Alertmanager 設定の検証

`validateAlertmanagerConfig` は nil のルート、マップ、スライスの値をたどる際にパニックする可能性がありました。修正後はパニックせずに検証を完了し、テスト対象の入力では検証エラーが返されません。

> * [BUGFIX] Alertmanager: Fix panic in `validateAlertmanagerConfig` when receiver config traversal encounters nil interface values. #7751

### Querier のアクティブリクエスト追跡におけるパニックの修正

- 影響対象: Querier のアクティブリクエスト追跡

すべて無効な UTF-8 継続バイトで構成された `match[]` / `query` の値を切り詰める際、後方へのスキャンでインデックスがアンダーフローし、`index out of range [-1]` のパニックが発生していました。スキャンはインデックス 0 で停止するようになり、パニックを回避します。

> * [BUGFIX] Querier: Fix panic (`index out of range [-1]`) in the active request tracker when truncating a `match[]`/`query` value made entirely of invalid UTF-8 continuation bytes. The backwards scan for a rune boundary now stops at index 0 instead of underflowing. #7743

### Compactor の最終クリーンアップにおける誤った失敗報告の修正

- 影響対象: GCS、Azure、Swift、OCI のオブジェクトストアを使用する Compactor 構成

削除対象としてマークされたテナントの最終クリーンアップ中に、存在しないオブジェクトの削除でエラーが発生すると、クリーンアップが失敗したと報告されていました。

> * [BUGFIX] Compactor: Fix the final cleanup of a tenant marked for deletion being reported as failed on object stores that return an error when deleting a missing object (GCS, Azure, Swift, OCI). #7861

## 機能・改善 (41)

- 残る Cortex 本番ヒストグラムのネイティブ形式とクラシック形式
- シャーディングされた Parquet の変換とクエリへの対応
- Parquet クエリフィルタリング用の行範囲キャッシュ
- Parquet コンバーターのリングステータスページの追加
- Querier 向けのリソースベースのクエリ拒否 (利用条件: `-querier.query-protection.rejection.threshold.cpu-utilization` および／または `-querier.query-protection.rejection.threshold.heap-utilization` をゼロ以外の値に設定し、対応するリソースタイプを `monitored_resources` に含めること)
- CPU・ヒープ使用率に基づく Querier のクエリ退避 (利用条件: `cpu-utilization` および／または `heap-utilization` に 0 を超える値（両方が 0 の場合は無効）)
- ブロック、ルーラールール、Alertmanager の状態向け OCI Object Storage サポート (利用条件: `backend: oci` の選択と `-<prefix>.oci.*` フラグの設定)
- フェーズ別クエリータイムアウト分類 (利用条件: クエリータイムアウト分類が有効であること)
- Ingester のテナントごとのアクティブ系列トラッキング (利用条件: ランタイム設定オーバーライドでの `active_series_trackers` の設定)
- distributor のクエリ fan-out 用ワーカープール (利用条件: `-distributor.num-query-workers` フラグ)
- store-gateway の `Series()` 同時実行時のデータバイト上限 (利用条件: `blocks-storage.bucket-store.max-concurrent-data-bytes`)
- Distributor による Prometheus Remote Write 2.0 の `StartTimestamp` 取り込み (利用条件: 実験的な `-distributor.enable-start-timestamp` フラグの有効化と、Prometheus Remote Write 2.0 を使用したリクエスト)
- Memberlist のクラスターラベル検証と段階的な展開制御 (利用条件: クラスターラベルを有効にするには `-memberlist.cluster-label` を設定してください。ラベルの段階的な展開を支援するため、`-memberlist.cluster-label-verification-disabled` も利用できます。)
- Distributor のクエリ fan-out 向け実験的ワーカープール
- 実験的な Ingester のアクティブシリーズ追跡 (利用条件: ランタイム設定オーバーライドでの `active_series_trackers` の設定)
- Ingester の head のみを対象とする queried-series メトリクス (利用条件: `-ingester.head-queried-series-metrics-enabled`（デフォルト: `false`）)
- Ruler のテナントごとのアラート生成 URL テンプレート (利用条件: テナントごとのランタイム設定オプション `ruler_alert_generator_url_template` の設定)
- Distributor による Remote Write 2.0 の開始タイムスタンプ取り込み (利用条件: `-distributor.enable-start-timestamp`)
- Memberlist クラスターラベルによる意図しないクラスター間参加の防止 (利用条件: `-memberlist.cluster-label` の設定。稼働中のラベル展開時は `-memberlist.cluster-label-verification-disabled` による検証の無効化)
- 評価負荷の高いタイムアウトを Querier がユーザーエラーに分類 (利用条件: `querier.timeout-classification-enabled` を `true` に設定)
- Querier のリソース使用量に基づくクエリエビクション (利用条件: `-querier.query-protection.eviction.threshold.cpu-utilization` または `-querier.query-protection.eviction.threshold.heap-utilization` を 0 より大きく設定)
- blocks、ruler、alertmanager 向けの OCI Object Storage 対応 (利用条件: `backend: oci` と対応する `-<prefix>.oci.*` フラグの設定)
- Store gateway の `Series()` リクエスト向け実験的な同時データバイト上限
- querier と ruler でのセレクター系列バッチ処理の設定 (利用条件: `-querier.selector-batch-size` または `-ruler.selector-batch-size` に正の値を設定。デフォルトの 0 ではバッチ処理は無効)
- Parquet ブロック変換におけるラベル名数の設定可能な上限
- Parquet Converter の ring-status エンドポイント追加
- store-gateway の Parquet クエリ並行数の設定 (利用条件: `-blocks-storage.bucket-store.parquet-query-concurrency`（YAML フィールド: `parquet_query_concurrency`）)
- Parquet クエリの行範囲向け設定可能なキャッシュ (利用条件: `-blocks-storage.bucket-store.parquet-row-ranges-cache.backend` に `memcached`、`redis`、`inmemory` のいずれかを設定します。これらの値をカンマ区切りで指定すると、マルチレベルキャッシュが構成されます。デフォルトは空で、キャッシュは無効です。)
- テナント別の `cortex_ingester_ingestion_delay_seconds` メトリクスの追加
- Ingester の TSDB WAL レコードメトリクスの追加
- Metrics Helper におけるネイティブヒストグラムの集約とマージ (利用条件: `nativeHistogramMetric`)
- テナントごとのクエリ結果キャッシュ TTL
- Query Scheduler による `cortex_query_scheduler_tracked_requests` メトリクスの公開
- 高コストクエリの拒否理由とクエリ統計の `reason` フィールドの追加
- Ingester read API の CPU プロファイルに `source` ラベルを追加
- ネイティブヒストグラム向け `cortex_distributor_received_histogram_buckets` メトリクス
- Ingester の head postings cache における正規表現の遅延評価 (利用条件: この機能はデフォルトで無効です。設定フラグは `-blocks-storage.expanded_postings_cache.head.lazy-matcher-max-cardinality`、`-blocks-storage.expanded_postings_cache.head.lazy-matcher-simple-cost-ratio`、`-blocks-storage.expanded_postings_cache.head.lazy-matcher-complex-cost-ratio` です。)
- Ring メトリクスへの `ring_duplicate_tokens` ゲージの追加
- 残る本番用ヒストグラムのネイティブ形式対応
- Ingester のテナントごとの TSDB ヘッド時刻メトリクス追加
- Ingester に TSDB head の一意なメトリック名数を示すゲージを追加 (利用条件: ゲージの登録には `-ingester.active-series-metrics-enabled` が true である必要があります。)

## 依存関係の更新 (9)

### `crypto/x509` のセキュリティ修正を含む Go 1.27.3 への更新

- [CVE-2026-111943](https://www.cve.org/CVERecord?id=CVE-2026-111943)

> - **Dependency and runtime updates**: Go 1.27.3, Prometheus v3.9.1, Alertmanager v0.33.0, gRPC v1.79.3, and distroless base images for the container images.

ほか8件（いずれもセキュリティへの言及なし）

- `- **Dependency and runtime updates**: Go 1.27.3, Prometheus v3.9.1, Alertmanager v0.33.0, gRPC v1.79.3, and distroless base images for the container images.`
- `- **Dependency and runtime updates**: Go 1.27.3, Prometheus v3.9.1, Alertmanager v0.33.0, gRPC v1.79.3, and distroless base images for the container images.`
- `* [ENHANCEMENT] Upgrade prometheus alertmanager version to v0.32.1. #7462`
- `* [ENHANCEMENT] Update build image and Go version to 1.26. #7434 #7437 #7716 #7726`
- `* [ENHANCEMENT] Upgrade prometheus version to v3.9.1. #7535`
- `* [ENHANCEMENT] Update prometheus alertmanager version to v0.33.0. #7647`
- `* [ENHANCEMENT] Upgrade Thanos and promql-engine to latest. #7505 #7691 #7740 #7788`
- `* [ENHANCEMENT] Update build image and Go version to 1.27.0. #7807 #7814`

## その他の変更 (28)

- ネイティブヒストグラム取り込みの実験的扱いの終了
- Cortex コンテナイメージの `gcr.io/distroless/static-debian12` への切り替え
- ネイティブヒストグラム取り込みの実験的扱いの終了
- TTL が 0 の場合のバケットインデックスキャッシュの無効化
- Parquet Converter に `-parquet-converter.max-num-columns` フラグを追加
- ユーザー同期の tick をまたいで保持される Tenant Federation 正規表現リゾルバーのキャッシュ
- Distributor の `Symbols` スライス向け適応型容量プーリング
- 削除対象ブロックのパーティション圧縮からの除外
- Prometheus Remote Write 2.0 における Distributor のスライス容量の再利用
- Ingester の展開済み postings キャッシュで LRU 方式の削除を採用
- Querier のストリーミングで系列データを gRPC バッファーから分離
- Store Gateway によるバケットインデックスからの Parquet シャード数の特定
- バケットインデックスローダーメトリクスへの `component` ラベル追加
- Query Frontend のスロークエリログにリクエストおよびクエリ統計情報を追加
- `ShuffleShardWithLookback` サブリングのキャッシュ
- Ingester のサンプル拒否エラーに TSDB head の最大時刻を追加
- Compactor による有効なバージョンの parquet マーカー再読み込みの省略
- Ruler のクエリエラーメッセージの一貫化
- Querier レスポンスコーデックでヒストグラムバケットを値スライスに変更
- Querier のマージイテレーターの `BatchSize` を8に縮小
- Alpine 3.23 向けパッケージング用 Dockerfile のビルド修正
- Compactor テストにおけるユーザー所有権のポーリング
- Compactorのブロッククリーナーにおけるvisit-markerハートビート完了待ち
- 不安定だった store-gateway 統合テスト条件の修正
- Store Gateway のキャッシュ検証メッセージの修正
- Compactor の部分ブロックのクリーンアップにおける不要な再試行とエラーログの回避
- Parquet Converter のリングからの自動削除の有効化
- Parquet Converter のエラーが正しいリングを示す修正

---

整理した内容は AI が作成するため誤っている可能性があり、無保証で提供されます。
