You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by 10110346 <gi...@git.apache.org> on 2017/07/13 07:33:44 UTC

[GitHub] spark issue #18251: [SPARK-21033][SQL] fix the potential OOM in UnsafeExtern...

Github user 10110346 commented on the issue:

    https://github.com/apache/spark/pull/18251
  
    Making `DEFAULT_NUM_ELEMENTS_FOR_SPILL_THRESHOLD` 2 times smaller may be not very well, this will increase the `spill`.
    Adding a safe check in ` UnsafeExternalSorter.growPointerArrayIfNecessary` is necessary
      
     1.if the initial size of point array is 4K, the point array will  grow like this:4k,8k,16k......256M,512M.
     if the 'numRecords' is between 256M and 512M, the pointer array will not grow, so it will not hit the max-page-size error.
     
     2.if the initial size of point array is other value, and the 'numRecords' is  256M and 512M, maybe the pointer array will grow, but we have added a safe check in `UnsafeExternalSorter.growPointerArrayIfNecessary`,so it is safe.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org