Return-Path: X-Original-To: apmail-hawq-dev-archive@minotaur.apache.org Delivered-To: apmail-hawq-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4224518C54 for ; Thu, 3 Dec 2015 01:39:40 +0000 (UTC) Received: (qmail 78002 invoked by uid 500); 3 Dec 2015 01:39:35 -0000 Delivered-To: apmail-hawq-dev-archive@hawq.apache.org Received: (qmail 77951 invoked by uid 500); 3 Dec 2015 01:39:35 -0000 Mailing-List: contact dev-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 dev@hawq.incubator.apache.org Received: (qmail 77940 invoked by uid 99); 3 Dec 2015 01:39:34 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Dec 2015 01:39:34 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 819701A5BF5 for ; Thu, 3 Dec 2015 01:39:34 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.447 X-Spam-Level: X-Spam-Status: No, score=0.447 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.554, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id q5oc4Pajp5b1 for ; Thu, 3 Dec 2015 01:39:27 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with SMTP id 4A44520C40 for ; Thu, 3 Dec 2015 01:39:26 +0000 (UTC) Received: (qmail 77382 invoked by uid 99); 3 Dec 2015 01:39:25 -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; Thu, 03 Dec 2015 01:39:25 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 70B49E048C; Thu, 3 Dec 2015 01:39:25 +0000 (UTC) From: huor To: dev@hawq.incubator.apache.org Reply-To: dev@hawq.incubator.apache.org References: In-Reply-To: Subject: [GitHub] incubator-hawq pull request: HAWQ-201. Resource uneven or fragment... Content-Type: text/plain Message-Id: <20151203013925.70B49E048C@git1-us-west.apache.org> Date: Thu, 3 Dec 2015 01:39:25 +0000 (UTC) Github user huor commented on a diff in the pull request: https://github.com/apache/incubator-hawq/pull/144#discussion_r46503312 --- Diff: src/backend/resourcemanager/resourcemanager.c --- @@ -2168,6 +2169,37 @@ int generateAllocRequestToBroker(void) elog(RMLOG, "Resource manager now needs %d GRM containers.", reqcore); + /* + * Check if should raise water level to deal with resource fragment or + * resource uneven problems. We trigger this logic only when no resource + * request caused by lack of resource, and no pending resource are waited + * for. + */ + if ( reqcore <= 0 && + mctrack->TotalPending.Core <= 0 && + (PQUEMGR->hasResourceProblem[RESPROBLEM_FRAGMENT] || + PQUEMGR->hasResourceProblem[RESPROBLEM_UNEVEN] || + PQUEMGR->hasResourceProblem[RESPROBLEM_TOOFEWSEG]) ) + { + /* Check if it is possible to raise water level. */ + if ( mctrack->TotalAllocated.Core + 1 <= + PRESPOOL->GRMTotal.Core * PQUEMGR->GRMQueueMaxCapacity ) + { + /* + * We only add one more GRM container to acquire, this will trigger + * the following logic to raise the water level. + */ + reqcore = 1; + reqmem = reqcore * mctrack->MemCoreRatio; + + PQUEMGR->hasResourceProblem[RESPROBLEM_FRAGMENT] = false; --- End diff -- Here we are marking fragment, or uneven, or too few segments problem false, is this means that adding one more container would resolve all these three kind of issue? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---