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-365. Improve DEBUG level log for counting resource queue active connections
Date Wed, 27 Jan 2016 03:42:31 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 71ca7d577 -> 69e865b9f


HAWQ-365. Improve DEBUG level log for counting resource queue active connections


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

Branch: refs/heads/master
Commit: 69e865b9f8f5b1690e679952e1e66575f8028edc
Parents: 71ca7d5
Author: YI JIN <yjin@pivotal.io>
Authored: Wed Jan 27 14:42:08 2016 +1100
Committer: YI JIN <yjin@pivotal.io>
Committed: Wed Jan 27 14:42:08 2016 +1100

----------------------------------------------------------------------
 src/backend/resourcemanager/resqueuemanager.c | 29 ++++++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/69e865b9/src/backend/resourcemanager/resqueuemanager.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/resqueuemanager.c b/src/backend/resourcemanager/resqueuemanager.c
index 1f27525..e2a2f43 100644
--- a/src/backend/resourcemanager/resqueuemanager.c
+++ b/src/backend/resourcemanager/resqueuemanager.c
@@ -2142,8 +2142,10 @@ int registerConnectionByUserID(ConnectionTrack  conntrack,
 
 	transformConnectionTrackProgress(conntrack, CONN_PP_REGISTER_DONE);
 
-	elog(LOG, "ConnID %d. Connection is registered.", conntrack->ConnID);
-
+	elog(DEBUG3, "Resource queue %s has %d connections after registering "
+				 "connection.",
+				 queuetrack->QueueInfo->Name,
+				 queuetrack->CurConnCounter);
 exit:
 	if ( res != FUNC_RETURN_OK )
 	{
@@ -2170,6 +2172,11 @@ void returnConnectionToQueue(ConnectionTrack conntrack, bool istimeout)
 		transformConnectionTrackProgress(conntrack, CONN_PP_TIMEOUT_FAIL);
 	}
 
+	elog(DEBUG3, "Resource queue %s has %d connections before returning "
+				 "connection ConnID %d.",
+				 track->QueueInfo->Name,
+				 track->CurConnCounter,
+				 conntrack->ConnID);
 	track->CurConnCounter--;
 	if ( track->CurConnCounter == 0 )
 	{
@@ -2216,6 +2223,9 @@ int acquireResourceFromResQueMgr(ConnectionTrack  conntrack,
 	int						res			= FUNC_RETURN_OK;
 	DynResourceQueueTrack	queuetrack	= conntrack->QueueTrack;
 
+	elog(LOG, "ConnID %d. Expect query resource for session "INT64_FORMAT,
+			  conntrack->SessionID);
+
 	/* Call quota logic to make decision of resource for current query. */
 	res = computeQueryQuota(conntrack, errorbuf, errorbufsize);
 
@@ -4597,6 +4607,13 @@ void detectAndDealWithDeadLock(DynResourceQueueTrack track)
 
 			/* Recycle connection track instance. */
 			Assert(track->CurConnCounter > 0);
+
+			elog(DEBUG3, "Resource queue %s has %d connections before removing "
+						 "deadlocked connection ConnID %d.",
+						 track->QueueInfo->Name,
+						 track->CurConnCounter,
+						 canceltrack->ConnID);
+
 			track->CurConnCounter--;
 			if ( track->CurConnCounter == 0 )
 			{
@@ -5543,6 +5560,14 @@ void applyResourceQueueTrackChangesFromShadows(List *quehavingshadow)
 
 				/* Recycle connection track instance. */
 				Assert(quetrack->CurConnCounter > 0);
+
+				elog(DEBUG3, "Resource queue %s has %d connections before handling "
+							 "deadlocked connection ConnID %d detected from a "
+							 "shadow.",
+							 quetrack->QueueInfo->Name,
+							 quetrack->CurConnCounter,
+							 conn->ConnID);
+
 				quetrack->CurConnCounter--;
 				if ( quetrack->CurConnCounter == 0 )
 				{


Mime
View raw message