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-444. The counter for increasing and decreasing memory quota is not correctly subtracted
Date Wed, 24 Feb 2016 02:51:31 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 20d14e3ad -> e7fc3f716


HAWQ-444. The counter for increasing and decreasing memory quota is not correctly subtracted


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

Branch: refs/heads/master
Commit: e7fc3f716ab0e8ed827fc651873c9bd8cc55f2e2
Parents: 20d14e3
Author: YI JIN <yjin@pivotal.io>
Authored: Wed Feb 24 13:51:21 2016 +1100
Committer: YI JIN <yjin@pivotal.io>
Committed: Wed Feb 24 13:51:21 2016 +1100

----------------------------------------------------------------------
 .../resourcemanager/communication/rmcomm_RM2RMSEG.c     | 12 ------------
 src/backend/resourcemanager/include/dynrm.h             |  6 ------
 src/backend/resourcemanager/resourcemanager.c           |  3 ---
 3 files changed, 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/e7fc3f71/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 e6b861b..b8aa234 100644
--- a/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
+++ b/src/backend/resourcemanager/communication/rmcomm_RM2RMSEG.c
@@ -441,8 +441,6 @@ void recvIncreaseMemoryQuotaResponse(AsyncCommMessageHandlerContext	context,
 
 void sentIncreaseMemoryQuota(AsyncCommMessageHandlerContext context)
 {
-	/* Mark that there is one more RPC on-the-fly for increasing resource quota. */
-	DRMGlobalInstance->IncreaseMemoryRPCCounter++;
 }
 
 void sentIncreaseMemoryQuotaError(AsyncCommMessageHandlerContext context)
@@ -470,10 +468,6 @@ void sentIncreaseMemoryQuotaCleanup(AsyncCommMessageHandlerContext context)
 
 	Assert( ctns->Containers == NULL );
 	rm_pfree(PCONTEXT, (GRMContainerSet)(context->UserData));
-
-	/* Mark that there is one RPC done for increasing resource quota. */
-	DRMGlobalInstance->IncreaseMemoryRPCCounter--;
-	Assert(DRMGlobalInstance->IncreaseMemoryRPCCounter >= 0);
 }
 
 int decreaseMemoryQuota(char 			*seghostname,
@@ -611,8 +605,6 @@ void recvDecreaseMemoryQuotaResponse(AsyncCommMessageHandlerContext	context,
 
 void sentDecreaseMemoryQuota(AsyncCommMessageHandlerContext context)
 {
-	/* Mark that there is one more RPC on-the-fly for decreasing resource quota. */
-	DRMGlobalInstance->DecreaseMemoryRPCCounter++;
 }
 
 void sentDecreaseMemoryQuotaError(AsyncCommMessageHandlerContext context)
@@ -639,10 +631,6 @@ void sentDecreaseMemoryQuotaCleanup(AsyncCommMessageHandlerContext context)
 	}
 
 	freeGRMContainerSet(ctns);
-
-	/* Mark that there is one RPC done for decreasing resource quota. */
-	DRMGlobalInstance->DecreaseMemoryRPCCounter--;
-	Assert(DRMGlobalInstance->DecreaseMemoryRPCCounter >= 0);
 }
 
 void processContainersAfterIncreaseMemoryQuota(GRMContainerSet ctns, bool accepted)

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/e7fc3f71/src/backend/resourcemanager/include/dynrm.h
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/include/dynrm.h b/src/backend/resourcemanager/include/dynrm.h
index 0cba28b..3171c54 100644
--- a/src/backend/resourcemanager/include/dynrm.h
+++ b/src/backend/resourcemanager/include/dynrm.h
@@ -240,12 +240,6 @@ struct DynRMGlobalData{
     bool					ResBrokerTriggerCleanup;
 
     /*------------------------------------------------------------------------*/
-    /* MARKER FOR RESOURCE ON-THE-FLY                                         */
-    /*------------------------------------------------------------------------*/
-    int						IncreaseMemoryRPCCounter;
-    int						DecreaseMemoryRPCCounter;
-
-    /*------------------------------------------------------------------------*/
     /* MARKER FOR RESOURCE BREATH                                             */
     /*------------------------------------------------------------------------*/
     int						ForcedReturnGRMContainerCount;

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/e7fc3f71/src/backend/resourcemanager/resourcemanager.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/resourcemanager.c b/src/backend/resourcemanager/resourcemanager.c
index 0abb99f..5ca34ba 100644
--- a/src/backend/resourcemanager/resourcemanager.c
+++ b/src/backend/resourcemanager/resourcemanager.c
@@ -850,9 +850,6 @@ int initializeDRMInstance(MCTYPE context)
 	DRMGlobalInstance->ResBrokerAppTimeStamp    = 0;
 	DRMGlobalInstance->ResBrokerTriggerCleanup  = false;
 
-	DRMGlobalInstance->IncreaseMemoryRPCCounter = 0;
-	DRMGlobalInstance->DecreaseMemoryRPCCounter = 0;
-
 	/* Get local host name here to make all components able to use this info. */
 	initSimpleString(&(DRMGlobalInstance->SocketLocalHostName), 	   context);
 	res = getLocalHostName(&(DRMGlobalInstance->SocketLocalHostName));


Mime
View raw message