GitHub user davies opened a pull request:

    https://github.com/apache/spark/pull/11095

    [SPARK-13210] [SQL] catch OOM when allocate memory and expand array

    There is a bug when we try to grow the buffer, OOM is ignore wrongly (the 
assert also skipped by JVM), then we try grow the array again, this one will 
trigger spilling free the current page, the current record we inserted will be 
invalid.
    
    The root cause is that JVM has less free memory than MemoryManager thought, 
it will OOM when allocate a page without trigger spilling. We should catch the 
OOM, and acquire memory again to trigger spilling.
    
    And also, we could not grow the array in `insertRecord` of `InMemorySorter` 
(it was there just for easy testing).

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/davies/spark fix_expand

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/11095.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #11095
    
----
commit ff77170471f4271b4db3775afb4e6d78b9565fb7
Author: Davies Liu <[email protected]>
Date:   2016-02-05T19:24:22Z

    catch OOM when allocate memory

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to