hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From y...@apache.org
Subject incubator-hawq git commit: HAWQ-663. Wrongly count total allocated resource in resource queue manager
Date Wed, 13 Apr 2016 01:35:46 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 1ba3686a6 -> 5553271a6


HAWQ-663. Wrongly count total allocated resource in resource queue manager


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/5553271a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/5553271a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/5553271a

Branch: refs/heads/master
Commit: 5553271a6e52f18bf447e39c06bfe70defcd4f13
Parents: 1ba3686
Author: YI JIN <yjin@pivotal.io>
Authored: Wed Apr 13 11:35:23 2016 +1000
Committer: YI JIN <yjin@pivotal.io>
Committed: Wed Apr 13 11:35:23 2016 +1000

----------------------------------------------------------------------
 src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c | 2 +-
 src/backend/resourcemanager/resourcepool.c                  | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/5553271a/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 50038b1..95bc194 100644
--- a/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
+++ b/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
@@ -204,7 +204,7 @@ void receivedRUAliveResponse(AsyncCommMessageHandlerContext  context,
 			/* Set the host down. */
 			elog(WARNING, "Resource manager sets host %s from up to down "
 					  	  "due to not getting valid RUAlive response.",
-					  GET_SEGRESOURCE_HOSTNAME(segres));
+						  GET_SEGRESOURCE_HOSTNAME(segres));
 
 			refreshResourceQueueCapacity(false);
 			refreshActualMinGRMContainerPerSeg();

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/5553271a/src/backend/resourcemanager/resourcepool.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/resourcepool.c b/src/backend/resourcemanager/resourcepool.c
index 9ed243e..f6beee0 100644
--- a/src/backend/resourcemanager/resourcepool.c
+++ b/src/backend/resourcemanager/resourcepool.c
@@ -3210,6 +3210,8 @@ void returnAllGRMResourceFromSegment(SegResource segres)
 	GRMContainerSet ctns  = NULL;
 	uint32_t 		count = 0;
 
+	minusResourceFromResourceManagerByBundle(&(segres->Allocated));
+
 	for ( int i = 0 ; i < PQUEMGR->RatioCount ; ++i )
 	{
 		ctns = segres->ContainerSets[i];
@@ -3262,7 +3264,6 @@ void returnAllGRMResourceFromUnavailableSegments(void)
 		{
 			continue;
 		}
-		minusResourceFromResourceManagerByBundle(&(segres->Allocated));
 		returnAllGRMResourceFromSegment(segres);
 	}
 	freePAIRRefList(&(PRESPOOL->Segments), &allsegres);


Mime
View raw message