Return-Path: X-Original-To: apmail-hawq-commits-archive@minotaur.apache.org Delivered-To: apmail-hawq-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8FF57194CE for ; Tue, 19 Apr 2016 03:52:00 +0000 (UTC) Received: (qmail 68166 invoked by uid 500); 19 Apr 2016 03:52:00 -0000 Delivered-To: apmail-hawq-commits-archive@hawq.apache.org Received: (qmail 68117 invoked by uid 500); 19 Apr 2016 03:52:00 -0000 Mailing-List: contact commits-help@hawq.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hawq.incubator.apache.org Delivered-To: mailing list commits@hawq.incubator.apache.org Received: (qmail 68108 invoked by uid 99); 19 Apr 2016 03:51:59 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Apr 2016 03:51:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 529E9C0D8B for ; Tue, 19 Apr 2016 03:51:59 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.221 X-Spam-Level: X-Spam-Status: No, score=-3.221 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id WoWzcmEzFTMU for ; Tue, 19 Apr 2016 03:51:57 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 5F1B35FB03 for ; Tue, 19 Apr 2016 03:51:56 +0000 (UTC) Received: (qmail 68103 invoked by uid 99); 19 Apr 2016 03:51:55 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Apr 2016 03:51:55 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 80E7ADFB7A; Tue, 19 Apr 2016 03:51:55 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: yjin@apache.org To: commits@hawq.incubator.apache.org Message-Id: <3739faa04e16484598c7f70269ca5726@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: incubator-hawq git commit: HAWQ-687. The segment resource increase pending counter is not adjusted correctly when failing to increase resource quota Date: Tue, 19 Apr 2016 03:51:55 +0000 (UTC) Repository: incubator-hawq Updated Branches: refs/heads/master 649828ff7 -> 1469782ed HAWQ-687. The segment resource increase pending counter is not adjusted correctly when failing to increase resource quota Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/1469782e Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/1469782e Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/1469782e Branch: refs/heads/master Commit: 1469782edd0552e1635952a9677ac38241665257 Parents: 649828f Author: YI JIN Authored: Tue Apr 19 13:51:36 2016 +1000 Committer: YI JIN Committed: Tue Apr 19 13:51:36 2016 +1000 ---------------------------------------------------------------------- .../resourcemanager/communication/rmcomm_RM2RMSEG.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/1469782e/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c ---------------------------------------------------------------------- diff --git a/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c b/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c index a726723..a79bd6c 100644 --- a/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c +++ b/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c @@ -627,6 +627,11 @@ void processContainersAfterIncreaseMemoryQuota(GRMContainerSet ctns, bool accept PRESPOOL->AddPendingContainerCount--; elog(LOG, "AddPendingContainerCount minus 1, current value %d", PRESPOOL->AddPendingContainerCount); + + /* This container can not generate additional increase pending */ + minusResourceBundleData(&(ctn->Resource->IncPending), + ctn->MemoryMB, + ctn->Core); /* * Add container to ToKickContainers if lifetime is not too long. * If the resource manager is not in clean up phase, directly drop @@ -635,16 +640,14 @@ void processContainersAfterIncreaseMemoryQuota(GRMContainerSet ctns, bool accept if( !isCleanGRMResourceStatus() && ctn->Life < RESOURCE_CONTAINER_MAX_LIFETIME ) { - /* This container can not generate additional increase pending */ - minusResourceBundleData(&(ctn->Resource->IncPending), - ctn->MemoryMB, - ctn->Core); addGRMContainerToToBeAccepted(ctn); } /* Add container to KickedContainers if lifetime is long enough */ else { - removePendingResourceRequestInRootQueue(ctn->MemoryMB, ctn->Core, false); + removePendingResourceRequestInRootQueue(ctn->MemoryMB, + ctn->Core, + false); addGRMContainerToKicked(ctn); } }