fix: dfbench respects DATAFUSION_RUNTIME_MEMORY_LIMIT env var#20631
Open
adriangb wants to merge 1 commit intoapache:mainfrom
Open
fix: dfbench respects DATAFUSION_RUNTIME_MEMORY_LIMIT env var#20631adriangb wants to merge 1 commit intoapache:mainfrom
adriangb wants to merge 1 commit intoapache:mainfrom
Conversation
When no `--memory-limit` CLI flag is provided, `runtime_env_builder()` now falls back to the `DATAFUSION_RUNTIME_MEMORY_LIMIT` environment variable. This makes the memory pool configuration consistent with how other `DATAFUSION_*` env vars are handled via `SessionConfig::from_env()`. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0e734ab to
1c8ec9b
Compare
Contributor
Author
|
@alamb a small fix |
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.
Which issue does this PR close?
N/A — discovered while running benchmarks with
bench.sh.Rationale for this change
When running benchmarks via
bench.sh/dfbench, settingDATAFUSION_RUNTIME_MEMORY_LIMIT=2Gis ignored for memory pool enforcement. MostDATAFUSION_*env vars work becauseSessionConfig::from_env()picks them up, but the memory limit is a special case — it requires constructing aMemoryPoolin theRuntimeEnv, whichdfbenchonly did when--memory-limitwas passed as a CLI flag.What changes are included in this PR?
In
runtime_env_builder(), whenself.memory_limit(CLI flag) isNone, fall back to reading theDATAFUSION_RUNTIME_MEMORY_LIMITenv var using the existingparse_memory_limit()function. The CLI flag still takes precedence when provided.Are these changes tested?
Yes — added
test_runtime_env_builder_reads_env_varwhich sets the env var, constructs aCommonOptwith no CLI memory limit, and verifies the resultingRuntimeEnvhas aFinite(2GB)memory pool.Are there any user-facing changes?
dfbenchnow honors theDATAFUSION_RUNTIME_MEMORY_LIMITenvironment variable as a fallback when--memory-limitis not passed on the command line. No breaking changes — existing CLI flag behavior is unchanged.🤖 Generated with Claude Code