feat: Expose used MemoryPool details in ResourcesExhausted error messages#20387
Open
erenavsarogullari wants to merge 5 commits intoapache:mainfrom
Open
feat: Expose used MemoryPool details in ResourcesExhausted error messages#20387erenavsarogullari wants to merge 5 commits intoapache:mainfrom
MemoryPool details in ResourcesExhausted error messages#20387erenavsarogullari wants to merge 5 commits intoapache:mainfrom
Conversation
75af7db to
168b51a
Compare
168b51a to
73bcc70
Compare
b24f6c8 to
897b01c
Compare
MemoryPool in ResourcesExhausted error messages
MemoryPool in ResourcesExhausted error messagesMemoryPool details in ResourcesExhausted error messages
200940a to
10d6c19
Compare
nathanb9
approved these changes
Apr 20, 2026
Contributor
nathanb9
left a comment
There was a problem hiding this comment.
Nice. This makes sense to me
10d6c19 to
ff7b82a
Compare
ff7b82a to
9abbd3a
Compare
xudong963
reviewed
Apr 20, 2026
| write!( | ||
| f, | ||
| "{}", | ||
| format_args!( |
Member
There was a problem hiding this comment.
do we need this format_args!?
xudong963
reviewed
Apr 20, 2026
| } | ||
| } | ||
|
|
||
| impl Display for FairSpillPool { |
Member
There was a problem hiding this comment.
how about adding used in FairSpillPool Display
xudong963
approved these changes
Apr 20, 2026
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?
MemoryPooldetails inResourcesExhaustederror messages #20386.Rationale for this change
memory_limit(RuntimeEnvBuilder::new().with_memory_limit()) configuration usesgreedymemory pool asdefault. However, ifmemory_pool(RuntimeEnvBuilder::new().with_memory_pool()) is set, it overrides by expectedmemory_poolconfig such asfair. Also, if bothmemory_limitandmemory_poolconfigs are not set,unboundedmemory pool will be used so it can be useful to exposeultimately used/selected poolas part ofResourcesExhaustederror message for the end user awareness and the user may need to switch used memory pool (greedy,fair,unbounded),greedyandfairmemory pools runtime behaviors and this addition can help for this kind of comparison table by exposing used memory pool info as part of native logs.Please find following example use-cases by
datafusion-cli:Case1: datafusion-cli result when
memory-limitandtop-memory-consumers > 0are set:Case2: datafusion-cli result when
memory-limitandtop-memory-consumers = 0(disabling top memory consumers logging) are set:Case3: datafusion-cli result when only
memory-limit,memory-poolandtop-memory-consumers > 0are set:What changes are included in this PR?
Are these changes tested?
Yes and updating existing test cases.
Are there any user-facing changes?
Yes, being updated Resources Exhausted error messages.