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

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

Github user parthchandra commented on a diff in the pull request:

    https://github.com/apache/drill/pull/323#discussion_r49890071
  
    --- Diff: 
exec/memory/base/src/main/java/org/apache/drill/exec/memory/AllocationManager.java
 ---
    @@ -168,20 +213,26 @@ private BufferLedger(BaseAllocator allocator, 
ReleaseListener listener) {
         /**
          * Transfer any balance the current ledger has to the target ledger. 
In the case that the current ledger holds no
          * memory, no transfer is made to the new ledger.
    -     *
          * @param target
          *          The ledger to transfer ownership account to.
          * @return Whether transfer fit within target ledgers limits.
          */
    -    public boolean transferBalance(BufferLedger target) {
    +    public boolean transferBalance(final BufferLedger target) {
           Preconditions.checkNotNull(target);
           Preconditions.checkArgument(allocator.root == target.allocator.root,
               "You can only transfer between two allocators that share the 
same root.");
    +      allocator.assertOpen();
    +
    +      target.allocator.assertOpen();
    +      // if we're transferring to ourself, just return.
    +      if (target == this) {
    +        return true;
    +      }
     
           // since two balance transfers out from the allocator manager could 
cause incorrect accounting, we need to ensure
           // that this won't happen by synchronizing on the allocator manager 
instance.
    --- End diff --
    
    Comment needs to be updated


> New allocator causing a flatten regression test to fail with 
> IllegalStateException
> ----------------------------------------------------------------------------------
>
>                 Key: DRILL-4246
>                 URL: https://issues.apache.org/jira/browse/DRILL-4246
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Relational Operators
>    Affects Versions: 1.5.0
>            Reporter: Deneche A. Hakim
>            Assignee: Deneche A. Hakim
>            Priority: Blocker
>
> We are seeing the following error in the test cluster:
> {noformat}
> /framework/resources/Functional/flatten_operators/100000rows/filter3.q
> Query: 
> select uid, flatten(events) from `data.json` where uid > 1
> Failed with exception
> java.sql.SQLException: SYSTEM ERROR: IllegalStateException: Unaccounted for 
> outstanding allocation (851968)
> Allocator(op:0:0:0:Screen) 1000000/851968/1941504/10000000000 
> (res/actual/peak/limit)
> {noformat}



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

Reply via email to