feat: make writer's global-dict retained-memory budget configurable#279
Merged
Conversation
The OOM fix that bounded VortexWriter's global-dictionary retained memory hardcoded the aggregate budget at 256 MB (GLOBAL_DICT_MAX_RETAINED_BYTES). Expose it via WriteOptions so callers can tune it per host/workload: - WriteOptions gains a `globalDictMaxRetainedBytes` record component with a 256 MB default in defaults()/cascading() and a withGlobalDictMaxRetainedBytes(long) copy-method matching the existing withXxx convention. - VortexWriter reads the budget from its WriteOptions instead of the constant; the constant is deleted and its rationale moved onto the WriteOptions field. - Removed the setDictRetainedBudgetForTest(long) test seam; the demotion test now configures the budget through the real public API (WriteOptions.cascading(3).withGlobalDictMaxRetainedBytes(120_000L)). - Updated positional new WriteOptions(...) call sites for the new component. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
dfa1
force-pushed
the
feat/configurable-global-dict-budget
branch
from
July 18, 2026 12:04
2998c5b to
5dc0a7d
Compare
4 tasks
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.
Summary
GLOBAL_DICT_MAX_RETAINED_BYTES). Exposes it viaWriteOptions.withGlobalDictMaxRetainedBytes(long), following the exact existingwithZoneMaps/withGlobalDict/withZstdconvention.nyc-311(18.5M rows, 38 string columns), every column got demoted under the 256MB default (confirmed by inspecting the layout tree — all columns end upCHUNKED, noneDICT), costing 1.67x file size vs the Rust reference. Raising the budget on memory-rich hosts lets more columns keep their shared dictionary.VortexWriternow reads the budget fromWriteOptionsinstead of the constant; the test-onlysetDictRetainedBudgetForTestseam is removed in favor of configuring the budget through the real public API in tests.Test plan
./mvnw test -pl writer -am— 1709 tests, 0 failures./mvnw test-compile -pl calcite,integration,performance -am— all positionalWriteOptionscall sites updated, compiles cleanWriteOptionsTest(4 tests) + rewrittenGlobalDictUtf8Testdemotion test using the real public API🤖 Generated with Claude Code