Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85663c2535
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
0xamlab
force-pushed
the
computed-text-dictionary-memory-limit
branch
from
October 22, 2026 19:15
85663c2 to
72e7fd3
Compare
…nst the memory limit A computed text value source (e.g. a jitexpr field) interns its terms in a DynamicTermDictionary that grows while blocks are loaded, and that growth was never charged against AggregationLimitsGuard: a cardinality aggregation over a jitexpr text field with a 1 KB memory limit happily interned 50k terms (several MB). ValueSource gains a memory_consumption() method (0 for sources backed by a physical column: their memory belongs to the index, not to the request), and the collectors that can drive a computed text source (terms, cardinality over Str, and the metric collector behind value_count) charge the source's growth per block, following the existing mem_pre/mem_delta idiom of the terms and histogram bucket structures. The request-data charge includes the source's initial memory, covering the constant source, which interns its single term when it is built. Fixes quickwit-oss#3172.
0xamlab
force-pushed
the
computed-text-dictionary-memory-limit
branch
from
November 9, 2026 14:35
72e7fd3 to
d3958eb
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3172.
Root cause
Computed text sources intern values in
DynamicTermDictionary, but its term buffer, offsets, and hash-table buckets grow without chargingAggregationLimitsGuard. The issue repro interns 50,000 unique terms under a 1,024-byte limit and succeeds despite a several-MB dictionary.Fix
ValueSource::memory_consumption(), defaulting to zero for physical columns whose memory belongs to the index.Regression coverage
With 2,000 unique terms, all three aggregations fail at a 1 KB limit and succeed at 10 MB with correct results. A 4,096-byte constant literal is rejected at 1 KB for all three collectors, covering allocation before collection.
Verified after rebasing on
d66f88d8make test: 1,343 passed, 8 ignored.cargo test -p tantivy --features jitexpr --lib: 1,395 passed, 8 ignored.cargo test -p tantivy --no-default-features --features mmap,quickwit,failpoints,jitexpr --tests: 1,382 + 5 passed, 8 ignored.--lib aggregation: 375 passed.-D warningsfor both feature configurations: clean.cargo +nightly fmt --all -- --check: clean.