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-272. Quit resource manager process on segment if postmaster is not alive
Date Thu, 14 Jan 2016 02:46:26 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 3f52cbd8b -> 0827c7c78


HAWQ-272. Quit resource manager process on segment if postmaster is not alive


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

Branch: refs/heads/master
Commit: 0827c7c78986af4f95b7e3ff16cf9ad402063da8
Parents: 3f52cbd
Author: Wen Lin <wlin@pivotal.io>
Authored: Thu Jan 14 10:45:51 2016 +0800
Committer: Wen Lin <wlin@pivotal.io>
Committed: Thu Jan 14 10:45:51 2016 +0800

----------------------------------------------------------------------
 src/backend/resourcemanager/resourcemanager_RMSEG.c | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0827c7c7/src/backend/resourcemanager/resourcemanager_RMSEG.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/resourcemanager_RMSEG.c b/src/backend/resourcemanager/resourcemanager_RMSEG.c
index 893dd67..966bc7c 100644
--- a/src/backend/resourcemanager/resourcemanager_RMSEG.c
+++ b/src/backend/resourcemanager/resourcemanager_RMSEG.c
@@ -160,6 +160,12 @@ int MainHandlerLoop_RMSEG(void)
 
 	while( DRMGlobalInstance->ResManagerMainKeepRun ) {
 
+		if (!PostmasterIsAlive(true)) {
+			DRMGlobalInstance->ResManagerMainKeepRun = false;
+			elog(LOG, "Postmaster is not alive, resource manager exits");
+			break;
+		}
+
 		/* PART1. Handle socket server inputs. */
 		res = processAllCommFileDescs();
 		if ( res != FUNC_RETURN_OK ) {


Mime
View raw message