Skip to content

Navigation Menu

Sign in
Sign up

Remove the deprecated fifocache.size and querier.ingester-metadata-streaming settings - #7791

Open
CharlieTLe wants to merge 2 commits into
cortexproject:master from
CharlieTLe:release-1.22-pr-d2-remove-fifocache-metadata-streaming
Open

Remove the deprecated fifocache.size and querier.ingester-metadata-streaming settings #7791
CharlieTLe wants to merge 2 commits into
cortexproject:master from
CharlieTLe:release-1.22-pr-d2-remove-fifocache-metadata-streaming

Conversation

@CharlieTLe

@CharlieTLe CharlieTLe commented Aug 20, 2026

Copy link
Copy Markdown
Member

Groundwork for v1.22.0. Refs #5922.

Important

Stacked on #7790. Please merge that first; this branch contains its commit, so the
diff here shows both until it lands. Review the second commit only.

Unlike #7790, both settings here have a YAML config option and one of them changes
behaviour, so they are split out.

-<prefix>.fifocache.size

Deprecated in 1.1.0 (2020) — twenty-one minors and five years ago. 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").

-querier.ingester-metadata-streaming

Deprecated in 1.18.0, defaulted to true, and its help text has promised since then
that the feature "will be always on after v1.18". The querier now always uses the streaming
metadata RPCs, so this removes:

  • the non-streaming branches in distributor_queryable.go (Select on the /series path,
    LabelValues, LabelNames, labelNamesWithMatchers);
  • the three now-unreachable non-streaming methods from the local Distributor interface
    (MetricsForLabelMatchers, LabelValuesForLabelName, LabelNames). The real
    distributor keeps them; this only loosens what pkg/querier requires, and pkg/api
    never called them through the interface.
  • the tests that parameterised over streaming on/off, which collapse to a single case.

Also: a dead hidden YAML field

querier.ingester_streaming (doc:"hidden", bool) had no reader anywhere — just the
field declaration. It was left behind when -querier.ingester-streaming was deprecated in
1.17.0. Because Cortex decodes config with yaml.UnmarshalStrict, that key was still being
silently accepted until now.

I put it here rather than in #7790 so that PR stays honestly flag-only. Note this means the
plan's "flag-only" classification of -querier.ingester-streaming was slightly off.

Generated docs

docs/blocks-storage/querier.md, docs/configuration/config-file-reference.md and
schemas/cortex-config-schema.json are regenerated (make doc).

Verification

go build ./..., go vet ./... (no new findings), make doc, and
./pkg/querier/... ./pkg/chunk/cache/... ./pkg/cortex/... ./pkg/api/... all green.

@dosubot dosubot Bot added go Pull requests that update Go code type/breaking type/chore Something that needs to be done; not a bug or a feature labels Aug 20, 2026
CharlieTLe force-pushed the release-1.22-pr-d2-remove-fifocache-metadata-streaming branch from 4d1e4c8 to 5a2456e Compare August 20, 2026 01:18
CharlieTLe requested review from a team and danielblando and removed request for a team August 20, 2026 19:08
...reaming settings
Unlike the flag-only removals, both of these have a YAML config option and one of them
changes behaviour, so they are split out here.
-<prefix>.fifocache.size was deprecated in 1.1.0, five years and twenty-one minors ago.
A cache configured only through it now starts with no capacity, because NewFifoCache no
longer copies it into MaxSizeItems.
-querier.ingester-metadata-streaming defaulted to true and its help text has promised
since 1.18.0 that the feature would be always on. The querier now always uses the
streaming metadata RPCs, so the non-streaming branches in distributor_queryable.go and
the three non-streaming methods on the local Distributor interface are gone. The tests
that parameterised over streaming on/off collapse accordingly.
Also removes the hidden ingester_streaming YAML field, which had no reader at all - it
was left behind when -querier.ingester-streaming was deprecated in 1.17.0. Because Cortex
decodes config with UnmarshalStrict, that field was still silently accepted until now.
Generated config docs and the JSON schema are regenerated.
Signed-off-by: Charlie Le <charlie_le@apple.com>
CharlieTLe force-pushed the release-1.22-pr-d2-remove-fifocache-metadata-streaming branch from 5a2456e to 9c8eb5b Compare September 1, 2026 22:12
CharlieTLe requested a review from a team as a code owner September 1, 2026 22:12

Copy link
Copy Markdown
Member

We need to delete it in docs/configuration/prometheus-frontend.md:42 and docs/configuration/prometheus-frontend.yml:29 as well.

CharlieTLe reacted with thumbs up emoji

...size field
The example query-frontend configs still set `fifocache.size`, which this
branch removes from FifoCacheConfig. Since Cortex decodes config with
yaml.UnmarshalStrict, both examples would now fail to load.
Replace it with `max_size_items: 1024` rather than dropping it, so the
example still describes a bounded cache instead of one that starts with no
capacity and logs a warning.
Signed-off-by: Charlie Le <charlie_le@apple.com>

Copy link
Copy Markdown
Member Author

Good catch, thanks — fixed in 316d263.

Both examples would have failed to load outright after this change, since Cortex decodes config with yaml.UnmarshalStrict.

I replaced the key rather than deleting it outright:

 fifocache:
 max_size_items: 1024 # was: size: 1024
 validity: 24h

Deleting size on its own would leave the example configuring a FIFO cache with no capacity at all (and logging neither fifocache.max-size-bytes nor fifocache.max-size-items is set), which isn't what the example is trying to show. max_size_items is what size was aliased to, so this keeps the intent. Happy to just drop the line instead if you'd prefer.

I also grepped the tree for any other config example still using size, ingester_metadata_streaming, or ingester_streaming — these two files were the only remaining hits outside historical CHANGELOG entries.

Verified by unmarshalling docs/configuration/prometheus-frontend.yml into cortex.Config with yaml.UnmarshalStrict, and re-ran make doc (no drift).


Unrelated pre-existing bug I noticed while in there, not touched in this PR: docs/configuration/prometheus-frontend.{md,yml} also set frontend.compress_responses, which no longer exists in CombinedFrontendConfig, so the example fails strict decoding on that line too. Already broken on master. Want me to fix it here, or file it separately?

Comment thread CHANGELOG.md
## master / unreleased
* [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
* [FEATURE] Engine: Add `-querier.selector-batch-size` and `-ruler.selector-batch-size` flags to configure series batching in the Thanos promQL engine. 0 disables batching. #7763
* [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

@SungJin1212 SungJin1212 Sep 11, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the Cortex fails to start in that the Cortex read yaml via yaml.UnmarshalStrict.

CharlieTLe added a commit to CharlieTLe/cortex that referenced this pull request Sep 11, 2026
Get the unreleased section into the shape RELEASE.md asks for before the
release-1.22 cut, so operators reading the notes see the changes that affect them:
- Delete the stale duplicate of cortexproject#7375, which already shipped in 1.21.0 as cortexproject#7370.
- Re-sort into CHANGE -> FEATURE -> ENHANCEMENT -> BUGFIX.
- Correct the gRPC entry: the bump landed at v1.82.1, not v1.79.3.
- Fold follow-up PRs into the entry they belong to.
- Add three missing user-facing entries: cortexproject#7513, cortexproject#7514 and cortexproject#7559.
- Reclassify as CHANGE the entries that break existing configs or log consumers:
 the sign-key validation (cortexproject#7587), the Alertmanager per-tenant *_file rejections
 (cortexproject#7767, cortexproject#7768, now one entry) and the time_taken -> time_taken_ms rename (cortexproject#7649).
- Note the operator impact of the distroless base image (cortexproject#7637) and of the
 500 -> 499 reclassification (cortexproject#7717).
Rebased onto master, which added eight entries after this was first written.
They are curated the same way:
- Sorted into their categories: the deprecated flag removal (cortexproject#7790) and the
 max-exemplars deprecation (cortexproject#7793) under CHANGE, the X-Grafana-User query log
 (cortexproject#7799) under ENHANCEMENT, the YAML zero-value validation (cortexproject#7700) and the
 ReadPartitionedGroupInfo error handling (cortexproject#7766) under BUGFIX.
- Folded the Go toolchain bump (cortexproject#7807, cortexproject#7814) into the existing build image
 entry, which now reads 1.27.0 rather than carrying a second entry for it.
- Folded cortexproject#7745 into cortexproject#7698: both are the same wipe-on-transient-DNS-failure bug,
 cortexproject#7698 on the A record path and cortexproject#7745 on the SRV path.
- Folded cortexproject#7743 into cortexproject#7640: both are panics in the active request tracker's
 truncation of match[]/query values.
Rebased again onto master, which added eight more entries. Same treatment:
- Sorted into their categories: the evaluation-delay-duration removal (cortexproject#7792)
 and the fifocache/ingester-metadata-streaming removals (cortexproject#7791) under CHANGE,
 the parquet max-block-label-names limit (cortexproject#7625), the non-pointer
 HistogramBucket slice (cortexproject#7809) and the merge iterator BatchSize (cortexproject#7823) under
 ENHANCEMENT, and the CSV-list empty-string fix (cortexproject#7714) under BUGFIX.
- Folded the Thanos/promql-engine refresh (cortexproject#7788) into the existing upgrade
 entry, which already carries cortexproject#7691, cortexproject#7505 and cortexproject#7740.
Signed-off-by: Charlie Le <charlie_le@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@SungJin1212 SungJin1212 SungJin1212 left review comments
@danielblando danielblando Awaiting requested review from danielblando danielblando is a code owner automatically assigned from cortexproject/maintainers

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

go Pull requests that update Go code size/XL type/breaking type/chore Something that needs to be done; not a bug or a feature

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /