hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject incubator-hawq git commit: HAWQ-113. Fix NONE mode resource broker minus more pending resource when failed to allocate resource
Date Fri, 30 Oct 2015 08:21:41 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 8e59c700e -> 224541eec


HAWQ-113. Fix NONE mode resource broker minus more pending resource when failed to allocate
resource


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

Branch: refs/heads/master
Commit: 224541eecfba50f1c6ed7d3afd03942c5d09e2ac
Parents: 8e59c70
Author: Wen Lin <wlin@pivotal.io>
Authored: Fri Oct 30 16:25:55 2015 +0800
Committer: Wen Lin <wlin@pivotal.io>
Committed: Fri Oct 30 16:25:55 2015 +0800

----------------------------------------------------------------------
 .../resourcebroker/resourcebroker_NONE.c              | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/224541ee/src/backend/resourcemanager/resourcebroker/resourcebroker_NONE.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/resourcebroker/resourcebroker_NONE.c b/src/backend/resourcemanager/resourcebroker/resourcebroker_NONE.c
index 8eaa7ba..be0c124 100644
--- a/src/backend/resourcemanager/resourcebroker/resourcebroker_NONE.c
+++ b/src/backend/resourcemanager/resourcebroker/resourcebroker_NONE.c
@@ -48,7 +48,6 @@ int RB_NONE_acquireResource(uint32_t memorymb, uint32_t core, List *preferred)
 	GRMContainer 		newcontainer	= NULL;
 	int					hostcount		= PRESPOOL->SegmentIDCounter;
 	ListCell		   *cell			= NULL;
-	int					res				= FUNC_RETURN_OK;
 
 	elog(DEBUG3, "NONE mode resource broker received resource allocation request "
 				 "(%d MB, %d CORE)",
@@ -196,16 +195,11 @@ int RB_NONE_acquireResource(uint32_t memorymb, uint32_t core, List *preferred)
 				contactcount,
 				contcount);
 
-	if ( contactcount <= 0 ) {
-		res = RESBROK_TEMP_NO_RESOURCE;
-	}
-
 	/* Clean up pending resource quantity. */
-	removePendingResourceRequestInRootQueue( contmemorymb * (contcount - contactcount),
-											 1            * (contcount - contactcount),
-											 res == FUNC_RETURN_OK);
-
-	return res;
+	removePendingResourceRequestInRootQueue(contmemorymb * (contcount - contactcount),
+											1            * (contcount - contactcount),
+											contactcount > 0);
+	return FUNC_RETURN_OK;
 }
 
 int RB_NONE_returnResource(List **ctnl)


Mime
View raw message