[ 
https://issues.apache.org/jira/browse/DRILL-8488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17837525#comment-17837525
 ] 

ASF GitHub Bot commented on DRILL-8488:
---------------------------------------

shfshihuafeng opened a new pull request, #2900:
URL: https://github.com/apache/drill/pull/2900

   # [DRILL-8488](https://issues.apache.org/jira/browse/DRILL-8488): 
HashJoinPOP memory leak is caused by  OutOfMemoryException
   
   (Please replace `PR Title` with actual PR Title)
   
   ## Description
   
   We should catch the OutOfMemoryException instead of OutOfMemoryError
   
   ```
    public DrillBuf buffer(final int initialRequestSize, BufferManager manager) 
{
       assertOpen();
   
       Preconditions.checkArgument(initialRequestSize >= 0, "the requested size 
must be non-negative");
   
       if (initialRequestSize == 0) {
         return empty;
       }
   
       // round to next largest power of two if we're within a chunk since that 
is how our allocator operates
       final int actualRequestSize = initialRequestSize < CHUNK_SIZE ?
           nextPowerOfTwo(initialRequestSize)
           : initialRequestSize;
       AllocationOutcome outcome = allocateBytes(actualRequestSize);
       if (!outcome.isOk()) {
         **throw new OutOfMemoryException**(createErrorMsg(this, 
actualRequestSize, initialRequestSize));
       }
   }
   ```
   
   ## Documentation
   (Please describe user-visible changes similar to what should appear in the 
Drill documentation.)
   
   ## Testing
   [drill-848](https://issues.apache.org/jira/browse/DRILL-8485))
   




> HashJoinPOP memory leak is caused by  OutOfMemoryException
> ----------------------------------------------------------
>
>                 Key: DRILL-8488
>                 URL: https://issues.apache.org/jira/browse/DRILL-8488
>             Project: Apache Drill
>          Issue Type: Bug
>          Components:  Server
>    Affects Versions: 1.21.1
>            Reporter: shihuafeng
>            Priority: Major
>             Fix For: 1.22.0
>
>
> [DRILL-8485|[DRILL-8485] HashJoinPOP memory leak is caused by an oom 
> exception when read data from InputStream - ASF JIRA (apache.org)] 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to