-
Notifications
You must be signed in to change notification settings - Fork 28k
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
[SPARK-26117][CORE][SQL]use SparkOutOfMemoryError instead of OutOfMemoryError when catch exception #23084
Conversation
@@ -741,7 +742,7 @@ public boolean append(Object kbase, long koff, int klen, Object vbase, long voff | |||
if (numKeys >= growthThreshold && longArray.size() < MAX_CAPACITY) { | |||
try { | |||
growAndRehash(); | |||
} catch (OutOfMemoryError oom) { | |||
} catch (SparkOutOfMemoryError oom) { |
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.
do you know what was the behavior before? Will we propagate the exception all the way up and kill the executor?
ok to test |
add to whitelist |
good catch! thanks! |
I think that we need to take care of |
Test build #99006 has finished for PR 23084 at commit
|
Test build #99002 has finished for PR 23084 at commit
|
7345942
to
400bcd5
Compare
@cloud-fan, I think not kill executor. the memory allocate fails, and the caller is notified to perform other operations. for example, HashAggregateExec will carry out spill the map and fallback to sort-based. |
Test build #99045 has finished for PR 23084 at commit
|
retest this please |
Test build #99046 has finished for PR 23084 at commit
|
Do you mean this patch change nothing for this case? |
I think |
so this PR is just code cleanup, not a real bug. thanks. |
I think it's safer to only catch the spark-thrown OOM, not the system OOM, so LGTM |
thanks, merging to master! |
@cloud-fan,thanks |
…moryError when catch exception ## What changes were proposed in this pull request? the pr apache#20014 which introduced `SparkOutOfMemoryError` to avoid killing the entire executor when an `OutOfMemoryError `is thrown. so apply for memory using `MemoryConsumer. allocatePage `when catch exception, use `SparkOutOfMemoryError `instead of `OutOfMemoryError` ## How was this patch tested? N / A Closes apache#23084 from heary-cao/SparkOutOfMemoryError. Authored-by: caoxuewen <cao.xuewen@zte.com.cn> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
What changes were proposed in this pull request?
the pr #20014 which introduced
SparkOutOfMemoryError
to avoid killing the entire executor when anOutOfMemoryError
is thrown.so apply for memory using
MemoryConsumer. allocatePage
when catch exception, useSparkOutOfMemoryError
instead ofOutOfMemoryError
How was this patch tested?
N / A