-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add integration test for erroring when memory limits are hit #4406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
50b3509 to
2617ef3
Compare
| "Cannot spill AggregationState".to_owned(), | ||
| )) | ||
| Err(DataFusionError::ResourcesExhausted(format!( | ||
| "Cannot spill {}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improved error message here
| return Ok(0); | ||
| } | ||
|
|
||
| debug!( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just moved the debug message down as it was confusing that spill didn't actually happen if in_mem_batches was empty
| let mut batches = vec![]; | ||
|
|
||
| // use a random number generator to pick a random sized output | ||
| let mut rng = StdRng::seed_from_u64(42); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This piece of code was copied in several places so I refactored it into stagger_batch
2617ef3 to
4be318c
Compare
|
cc @crepererum and @milenkovicm |
crepererum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 💪
| .await | ||
| } | ||
|
|
||
| /// 100K memory limit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
100k? How does relate to 50 and 0.95?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops -- the 100k is left over from a previous revision -- I will update the comment
|
Benchmark runs are scheduled for baseline = 66c95e7 and contender = 49166ea. 49166ea is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Draft as it is waiting on:ResourceExhaustedfor memory limit inAggregateStream#4405Which issue does this PR close?
Resolves #4404
Rationale for this change
I would like end to end coverage that when run with a memory limit, queries will error (rather than exceed the memory limit)
What changes are included in this PR?
memory_limitteststagger_batchinto a functionAre these changes tested?
Are there any user-facing changes?