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-212. Fix unittest failure due to introduced enum RESOURCEPROBLEM
Date Thu, 03 Dec 2015 07:02:48 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 7e2ad4c10 -> 951e9899c


HAWQ-212. Fix unittest failure due to introduced enum RESOURCEPROBLEM


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

Branch: refs/heads/master
Commit: 951e9899c7b76b77289188ee0c7f4e1f5689e68f
Parents: 7e2ad4c
Author: Yi Jin <yjin@pivotal.io>
Authored: Thu Dec 3 15:02:31 2015 +0800
Committer: Yi Jin <yjin@pivotal.io>
Committed: Thu Dec 3 15:02:31 2015 +0800

----------------------------------------------------------------------
 src/backend/resourcemanager/include/resqueuemanager.h | 4 ++--
 src/backend/resourcemanager/resqueuemanager.c         | 7 ++++---
 2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/951e9899/src/backend/resourcemanager/include/resqueuemanager.h
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/include/resqueuemanager.h b/src/backend/resourcemanager/include/resqueuemanager.h
index 819ba05..2866022 100644
--- a/src/backend/resourcemanager/include/resqueuemanager.h
+++ b/src/backend/resourcemanager/include/resqueuemanager.h
@@ -257,14 +257,14 @@ struct UserInfoData {
 typedef struct UserInfoData *UserInfo;
 typedef struct UserInfoData  UserInfoData;
 
-enum RESOURCEPROBLEM
+typedef enum RESOURCEPROBLEM
 {
 	RESPROBLEM_NO = 0,
 	RESPROBLEM_FRAGMENT,
 	RESPROBLEM_UNEVEN,
 	RESPROBLEM_TOOFEWSEG,
 	RESPROBLEM_COUNT
-};
+} RESOURCEPROBLEM;
 
 /******************************************************************************
  * In resource queue manager,  a list of resource queues are saved. This can  *

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/951e9899/src/backend/resourcemanager/resqueuemanager.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/resqueuemanager.c b/src/backend/resourcemanager/resqueuemanager.c
index c5ac176..d62a1d2 100644
--- a/src/backend/resourcemanager/resqueuemanager.c
+++ b/src/backend/resourcemanager/resqueuemanager.c
@@ -25,6 +25,7 @@
 #include "communication/rmcomm_MessageHandler.h"
 #include "communication/rmcomm_QD_RM_Protocol.h"
 #include "catalog/pg_resqueue.h"
+#include "resourcemanager/resqueuemanager.h"
 
 /*
  * The DDL statement attribute name strings.
@@ -166,7 +167,7 @@ void markMemoryCoreRatioWaterMark(DQueue 		marks,
 void buildTimeoutResponseForQueuedRequest(ConnectionTrack conntrack,
 										  uint32_t 		  reason);
 
-enum RESOURCEPROBLEM isResourceAcceptable(ConnectionTrack conn, int segnumact);
+RESOURCEPROBLEM isResourceAcceptable(ConnectionTrack conn, int segnumact);
 
 void adjustResourceExpectsByQueueNVSegLimits(ConnectionTrack conntrack);
 /*----------------------------------------------------------------------------*/
@@ -4082,7 +4083,7 @@ int dispatchResourceToQueries_EVEN(DynResourceQueueTrack track)
 										 &segnumact,
 										 &(conn->SegIOBytes));
 
-		enum RESOURCEPROBLEM accepted = isResourceAcceptable(conn, segnumact);
+		RESOURCEPROBLEM accepted = isResourceAcceptable(conn, segnumact);
 		if ( accepted == RESPROBLEM_NO )
 		{
 			elog(DEBUG3, "Resource manager dispatched %d segment(s) to connection %d",
@@ -4172,7 +4173,7 @@ int dispatchResourceToQueries_EVEN(DynResourceQueueTrack track)
 	return FUNC_RETURN_OK;
 }
 
-enum RESOURCEPROBLEM isResourceAcceptable(ConnectionTrack conn, int segnumact)
+RESOURCEPROBLEM isResourceAcceptable(ConnectionTrack conn, int segnumact)
 {
 	/*--------------------------------------------------------------------------
 	 * Enough number of vsegments. If resource queue has enough quota, but


Mime
View raw message