Return-Path: X-Original-To: apmail-drill-issues-archive@minotaur.apache.org Delivered-To: apmail-drill-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9029C17E7E for ; Tue, 22 Sep 2015 19:36:48 +0000 (UTC) Received: (qmail 63160 invoked by uid 500); 22 Sep 2015 19:30:05 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 63133 invoked by uid 500); 22 Sep 2015 19:30:05 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 63119 invoked by uid 99); 22 Sep 2015 19:30:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Sep 2015 19:30:04 +0000 Date: Tue, 22 Sep 2015 19:30:04 +0000 (UTC) From: "Deneche A. Hakim (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (DRILL-3811) AtomicRemainder incorrectly accounts for transferred allocations MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DRILL-3811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Deneche A. Hakim reassigned DRILL-3811: --------------------------------------- Assignee: Deneche A. Hakim (was: Chris Westin) > 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: Deneche A. Hakim > 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)