You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Chun Chang (JIRA)" <ji...@apache.org> on 2015/10/03 02:22:26 UTC

[jira] [Closed] (DRILL-3811) AtomicRemainder incorrectly accounts for transferred allocations

     [ https://issues.apache.org/jira/browse/DRILL-3811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chun Chang closed DRILL-3811.
-----------------------------
    Assignee: Chun Chang  (was: Deneche A. Hakim)

united test added. no additional action needed.

> AtomicRemainder incorrectly accounts for transferred allocations
> ----------------------------------------------------------------
>
>                 Key: DRILL-3811
>                 URL: https://issues.apache.org/jira/browse/DRILL-3811
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Relational Operators
>            Reporter: Deneche A. Hakim
>            Assignee: Chun Chang
>             Fix For: 1.2.0
>
>         Attachments: DRILL-3811.1.patch.txt
>
>
> when an allocator takes ownership of a buffer, AtomicRemainder.forceGet(int) is called to account for the extra memory of the buffer, but when the allocator exceeds it's maximum allocated memory it accounts for it incorrectly. In the following code, {{availableShared.andAndGet(size)}} should actually receive {{-size}}:
> {code}
> public boolean forceGet(long size) {
>     if (get(size, this.applyFragmentLimit)) {
>       return true;
>     } else {
>       availableShared.addAndGet(size);
>       if (parent != null) {
>         parent.forceGet(size);
>       }
>       return false;
>     }
>   }
> {code}
> I was able to reproduce the issue in a simple unit test



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