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-737. Last action time should be initialized as created time instead of 0
Date Tue, 17 May 2016 03:01:30 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 101adfab1 -> cec472dca


HAWQ-737. Last action time should be initialized as created time instead of 0


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

Branch: refs/heads/master
Commit: cec472dcab39a03ca31103c30b6fe32f0abfaa19
Parents: 101adfa
Author: YI JIN <yjin@pivotal.io>
Authored: Tue May 17 13:01:23 2016 +1000
Committer: YI JIN <yjin@pivotal.io>
Committed: Tue May 17 13:01:23 2016 +1000

----------------------------------------------------------------------
 src/backend/resourcemanager/conntrack.c       |  2 +-
 src/backend/resourcemanager/resqueuemanager.c | 21 ++++++++++++++-------
 2 files changed, 15 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/cec472dc/src/backend/resourcemanager/conntrack.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/conntrack.c b/src/backend/resourcemanager/conntrack.c
index c5b0fbf..5811c08 100644
--- a/src/backend/resourcemanager/conntrack.c
+++ b/src/backend/resourcemanager/conntrack.c
@@ -103,7 +103,7 @@ void createEmptyConnectionTrack(ConnectionTrack *track)
 	(*track)->RegisterTime   			= 0;
 	(*track)->ResRequestTime 			= 0;
 	(*track)->ResAllocTime	 			= 0;
-	(*track)->LastActTime	 			= 0;
+	(*track)->LastActTime	 			= gettime_microsec();
 	(*track)->HeadQueueTime				= 0;
 
 	(*track)->MessageSize	 	 		= 0;

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/cec472dc/src/backend/resourcemanager/resqueuemanager.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/resqueuemanager.c b/src/backend/resourcemanager/resqueuemanager.c
index cf4dc1f..2916df9 100644
--- a/src/backend/resourcemanager/resqueuemanager.c
+++ b/src/backend/resourcemanager/resqueuemanager.c
@@ -4509,8 +4509,11 @@ void timeoutDeadResourceAllocation(void)
 			if ( curmsec - curcon->LastActTime >
 				 1000000L * rm_session_lease_timeout )
 			{
-				elog(LOG, "ConnID %d. The allocated resource timeout is detected.",
-						  curcon->ConnID);
+				elog(WARNING, "ConnID %d. The allocated resource timeout is "
+							  "detected. Last action time is "UINT64_FORMAT
+							  "msec ago.",
+						      curcon->ConnID,
+						      curmsec - curcon->LastActTime);
 				returnResourceToResQueMgr(curcon);
 				returnConnectionToQueue(curcon, true);
 				if ( curcon->CommBuffer != NULL )
@@ -4530,9 +4533,11 @@ void timeoutDeadResourceAllocation(void)
 			if ( curmsec - curcon->LastActTime >
 				 1000000L * rm_session_lease_timeout )
 			{
-				elog(LOG, "ConnID %d. The queued resource request timeout is "
-						  "detected.",
-						  curcon->ConnID);
+				elog(WARNING, "ConnID %d. The queued resource request timeout is "
+						      "detected. Last action time is "UINT64_FORMAT
+							  "msec ago",
+						      curcon->ConnID,
+						      curmsec - curcon->LastActTime);
 
 				snprintf(errorbuf, sizeof(errorbuf),
 						 "queued resource request is timed out due to no session "
@@ -4558,8 +4563,10 @@ void timeoutDeadResourceAllocation(void)
 				 1000000L * rm_session_lease_timeout )
 			{
 				elog(WARNING, "The registered connection timeout is detected. "
-						  	  "ConnID %d",
-							  curcon->ConnID);
+						  	  "ConnID %d. Last action time is "UINT64_FORMAT
+							  "msec ago",
+							  curcon->ConnID,
+							  curmsec - curcon->LastActTime);
 				returnConnectionToQueue(curcon, true);
 				if ( curcon->CommBuffer != NULL )
 				{


Mime
View raw message