# Cortex v1.22.0

2026-11-20 · [릴리스 노트 원문](https://github.com/cortexproject/cortex/releases/tag/v1.22.0) · [전체 정리](https://ratatosk.io/ko/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 stream-push 인증이 위조 가능한 서명으로 강등됐습니다. 이제 이런 설정 오류가 있으면 프로세스 시작 단계에서 실패합니다.

> * [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 청크, pending 상태가 누수되어 `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

### [보안 여부 불분명] 카운트가 0인 float 히스토그램 처리 시 Ingester 패닉 수정

- 영향 대상: float 네이티브 히스토그램을 수집하는 설정

staleness marker나 빈 히스토그램처럼 카운트가 0인 float 히스토그램이 정수 디코더로 전달되어 동기식 gRPC `Push` 처리 중 ingester가 크래시할 수 있었습니다. 이제 float 디코더를 사용하므로 패닉 없이 수집할 수 있습니다.

> * [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`으로 설정합니다. 쿼리 오프셋 값은 더 이상 두 값 중 큰 값을 사용하지 않습니다.

근거: “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` 검색

이전에는 두 설정 중 더 큰 값이 유효 오프셋이었지만, 이제는 `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` 이외의 오류는 로그에 기록되고 생성이 중단됩니다. 따라서 기존 파일은 다음 compaction 주기에 재시도할 때까지 그대로 유지됩니다.

근거: “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

### 정규식 테넌트 페더레이션 시작 시 디스커버리 수정

- 영향 대상: 정규식 테넌트 페더레이션을 사용하는 설정

첫 ticker tick이 발생하기 전에 들어온 쿼리는 비어 있는 사용자 목록과 대조되어 테넌트가 잘못 확인될 수 있었습니다. 이제 서비스는 쿼리를 처리하기 전에 시작 과정에서 사용자를 디스커버리합니다. 초기 디스커버리에 실패하면 비어 있는 목록을 기준으로 서비스를 제공하는 대신 서비스 시작에 실패합니다.

근거: “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개 제거

- 영향 대상: 다음 플래그 중 하나라도 포함하는 Cortex 명령줄: `-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가 시작 시 중단됩니다.

근거: “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 및 런타임 설정(테넌트별 오버라이드 포함)
- 필요 조치: 가장 큰 `query_ingesters_within` 값보다 큰 `close_idle_tsdb_timeout` 설정 또는 유휴 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`이 증가합니다. 기간 값에는 최소 단위가 1 ms인 `model.Duration`을 사용합니다.

근거: “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의 지원 중단 예정 무효 명령줄 플래그 제거

- 영향 대상: 명령줄에 나열된 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

### 링 토큰 충돌 해결 로직 수정

- 영향 대상: `JOINING` 상태의 링 인스턴스 (추정)

두 인스턴스가 동시에 조인하면 첫 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

### 쿼리 프런트엔드의 네이티브 히스토그램 결과 정렬 수정

- 영향 대상: `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

### [드러나지 않던 결함] 규칙 로드 전에 Thanos xfunctions를 등록하는 Ruler

- 영향 대상: Thanos 엔진 xfunctions 플래그를 활성화한 Ruler 구성

이전에는 S3나 디스크에서 규칙 파일을 불러올 때, 규칙 파일 로더의 전역 파서에 해당 함수가 포함되지 않아 `xincrease`, `xrate` 또는 `xdelta`를 포함한 기록 규칙이 알림 없이 누락됐습니다.

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

### Querier parquet queryable 폴백의 쿼리 오류 반환

- 영향 대상: 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

### SRV 대상 조회 실패 시 엔드포인트를 유지하는 gRPC DNS 워처

- 영향 대상: 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 필드

이전에는 명시적으로 비어 있는 값을 빈 테넌트 이름 하나가 들어 있는 목록으로 파싱했습니다. 이제는 빈 목록으로 파싱합니다.

> * [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 강제 헤드 압축 건너뛰기의 실패 집계 제외

- 영향 대상: 블록 전송과 강제 헤드 압축이 겹칠 수 있는 Ingester 구성

블록 전송이 진행 중일 때 건너뛴 강제 헤드 압축이 `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 시리즈에 연결된 메타데이터가 시리즈마다 하나씩 `MetricMetadata`로 확장되었습니다. 메타데이터도 인제스트 한도에 포함되므로, 테넌트는 같은 데이터에 대해 설정된 `-distributor.ingestion-rate-limit`의 약 두 배를 소비할 수 있었습니다. 이제 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

### 테넌트 ID 확인 실패 시 Prometheus Remote Write 2.0 핸들러의 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

### 컴팩터 버킷 인덱스 정리 실패 수정

- 영향 대상: 버킷 인덱스 업데이터를 사용하는 컴팩터 설정

오래된 캐시 `Get()` 이후 `meta.json`이 삭제되면, 그 결과 발생하는 `Attributes()` 오류로 전체 정리 주기가 실패할 수 있었습니다. 이제 업데이터가 not-found 및 access-denied 오류를 처리하므로 이 경우 정리 주기가 더는 실패하지 않습니다.

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

### 컴팩션 실패 시 Ingester의 TSDB 정리

- 영향 대상: TSDB를 사용하는 Ingester

`tsdb.Open()` 이후 컴팩션에 실패하면 `createTSDB`가 데이터베이스를 닫지 않고 반환해 파일 디스크립터와 메모리 매핑 핸들이 누수되고 Ingester가 불안정해질 수 있었습니다. 이제 컴팩션 오류를 반환하기 전에 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` 종료 시 패닉 수정

- 영향 대상: Ingester에서 `ActiveQueriedSeriesService`를 사용하는 설정

종료 중 `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` 게이지 시계열 값은 0으로 떨어지며, 같은 위치에 있는 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`가 inhibitor와 dispatcher의 초기 로드가 끝나기 전에 반환될 수 있었습니다. 이로 인해 dispatcher 시작과 경합하거나 inhibitor 고루틴이 누수될 수 있었습니다. 이제 호출이 성공하면 메모리 내 초기 로드가 끝날 때까지 기다린 후 반환합니다.

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

### 종료 시 Distributor 푸시 워커 고루틴 해제

- 영향 대상: `-distributor.num-push-workers`로 설정한 distributor

distributor의 종료 단계에서 비동기 실행기가 중지됩니다.

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

### 비어 있지 않은 루트 섹션의 명시적 0 값을 허용하는 YAML 검증

- 영향 대상: 비어 있지 않은 루트 섹션에 명시적 0 값이 있는 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 watcher가 관리하는 query-frontend/scheduler 워커 연결

이전에는 DNS 조회에 실패하면 알려진 주소를 모두 지워 query-frontend/scheduler 워커 연결이 끊겼습니다. 이제 DNS watcher는 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를 사용하는 구성

이전에는 롤링 업데이트 중 여러 잉스터가 합류하는 경우처럼 링을 동시에 업데이트하다 충돌하면 업데이트가 즉시 실패했습니다. 이제 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

### 클라이언트가 취소한 푸시에 HTTP 499를 반환하는 Distributor

- 영향 대상: 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`을 0이 아닌 값으로 설정하고, 해당 리소스 유형을 `monitored_resources`에 포함)
- CPU 및 힙 사용률 기반 Querier 쿼리 축출 (사용 조건: `cpu-utilization` 및/또는 `heap-utilization`에 0보다 큰 값 설정; 두 값이 모두 0이면 비활성화)
- 블록, 룰러 규칙 및 Alertmanager 상태용 OCI 오브젝트 스토리지 지원 (사용 조건: `backend: oci` 선택 및 `-<prefix>.oci.*` 플래그 설정)
- 단계별 쿼리 타임아웃 분류 (사용 조건: 쿼리 타임아웃 분류 활성화)
- Ingester 테넌트별 활성 시계열 추적 (사용 조건: 런타임 설정 오버라이드에서 `active_series_trackers`로 구성)
- 디스트리뷰터 쿼리 팬아웃용 워커 풀 (사용 조건: `-distributor.num-query-workers` 플래그)
- 스토어 게이트웨이의 동시 `Series()` 데이터 바이트 제한 (사용 조건: `blocks-storage.bucket-store.max-concurrent-data-bytes`)
- 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 쿼리 팬아웃용 실험적 워커 풀
- Ingester의 실험적 활성 시리즈 추적 (사용 조건: 런타임 구성 오버라이드에서 `active_series_trackers` 설정)
- 인제스터 head 전용 조회 시리즈 메트릭 (사용 조건: `-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 게이트웨이 `Series()` 요청의 실험적 동시 데이터 바이트 제한
- querier와 ruler의 셀렉터 시리즈 배칭 설정 (사용 조건: `-querier.selector-batch-size` 또는 `-ruler.selector-batch-size`를 양수로 설정; 기본값 0은 배칭을 비활성화)
- Parquet 블록 변환 시 레이블 이름 수 제한 설정
- Parquet Converter 링 상태 엔드포인트 추가
- 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` 메트릭 노출
- Query Frontend의 고비용 쿼리 거부 사유 및 쿼리 통계 `reason` 필드 추가
- Ingester 읽기 API CPU 프로파일에 `source` 레이블 추가
- `cortex_distributor_received_histogram_buckets` 네이티브 히스토그램 메트릭
- Ingester 헤드 포스팅 캐시의 선택적 지연 정규식 평가 (사용 조건: 기본 비활성화, 설정 플래그 `-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` 게이지 추가
- Cortex의 나머지 프로덕션 히스토그램에 네이티브 형식 지원
- Ingester의 사용자별 TSDB head timestamp 메트릭 추가
- Ingester에 TSDB 헤드 고유 메트릭 이름 게이지 추가 (사용 조건: 게이지를 등록하려면 `-ingester.active-series-metrics-enabled`가 true여야 합니다.)

## 의존성 갱신 (9)

### Go 1.27.3 업데이트 및 `crypto/x509` 보안 수정

- [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` 플래그 추가
- 사용자 동기화 주기 간 유지되는 Tenant Federation 정규식 resolver 캐시
- Distributor `Symbols` 슬라이스의 적응형 용량 풀링
- 삭제 대상으로 표시된 블록을 파티션 컴팩션에서 제외
- Prometheus Remote Write 2.0용 Distributor 슬라이스 용량 재사용
- Ingester 확장 포스팅 캐시의 LRU 퇴출 방식 전환
- Querier 스트리밍에서 시리즈 데이터를 gRPC 버퍼와 분리
- 버킷 인덱스에서 Parquet 샤드 수 확인
- 버킷 인덱스 로더 메트릭에 `component` 레이블 추가
- Query Frontend 느린 쿼리 로그에 요청 및 쿼리 통계 추가
- `ShuffleShardWithLookback` 서브링 캐싱
- Ingester 샘플 거부 오류에 TSDB head 최대 시간 포함
- 컴팩터의 유효한 버전 Parquet 마커 재조회 생략
- Ruler 쿼리 오류 메시지 일관성 개선
- Querier 응답 코덱의 히스토그램 버킷을 값 슬라이스로 전환
- Querier 병합 이터레이터 `BatchSize` 8로 감소
- Alpine 3.23용 패키징 Dockerfile 빌드 수정
- 사용자 소유권을 폴링하는 Compactor 테스트
- Compactor 블록 클리너의 방문 마커 하트비트 완료 대기
- store-gateway 통합 테스트의 간헐적 실패 조건 수정
- Store Gateway 캐시 검증 메시지 수정
- Compactor 부분 블록 정리에서 불필요한 재시도와 오류 로그 방지
- Parquet Converter 자동 링 제거 활성화
- Parquet Converter 오류의 올바른 링 표시

---

정리 내용은 AI가 작성하므로 틀릴 수 있으며, 보증 없이 제공합니다.
