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

ASF GitHub Bot commented on HAWQ-544:
-------------------------------------

Github user foyzur commented on the pull request:

    https://github.com/apache/incubator-hawq/pull/454#issuecomment-198554875
  
    Hi @ictmalili the HandleMemoryAccountingGenerationOverflow() is not 
supposed to allocate more memory. Part of the job of the assert 
```Assert(RolloverMemoryAccount->peak >= MemoryAccountingPeakBalance);``` is to 
make sure that all the allocated memory are now owned by RolloverMemoryAccount. 
If we allow further allocation during the migration process, it will be very 
difficult (if not impossible) to ensure that. Therefore, the assert should 
itself prevent further allocation, if any, made by accidental future change.


> Wrong MemoryAccountingPeakBalance assert after calling elog in function 
> AdvanceMemoryAccountingGeneration, calling multiple errors thrown when OOM hit
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HAWQ-544
>                 URL: https://issues.apache.org/jira/browse/HAWQ-544
>             Project: Apache HAWQ
>          Issue Type: Bug
>          Components: Query Execution
>            Reporter: George Caragea
>            Assignee: George Caragea
>
> In function AdvanceMemoryAccountingGeneration, we first assign 
> "RolloverMemoryAccount->peak = Max(RolloverMemoryAccount->peak, 
> MemoryAccountingPeakBalance);", then we call elog if there is a generation 
> overflow. Then we assert "Assert(RolloverMemoryAccount->peak >= 
> MemoryAccountingPeakBalance);".
> If elog allocates additional memory, then this causes the assertion to fail.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to