hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject incubator-hawq git commit: HAWQ-1448. Fixed postmaster process hung at recv () on segment
Date Wed, 12 Jul 2017 10:38:17 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 64bd28213 -> 80e8322c2


HAWQ-1448. Fixed postmaster process hung at recv () on segment


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

Branch: refs/heads/master
Commit: 80e8322c29afd7594d0ffd1c55c8edb9063f279b
Parents: 64bd282
Author: Ming LI <mli@apache.org>
Authored: Tue May 2 12:23:10 2017 +0800
Committer: Ming LI <mli@apache.org>
Committed: Wed Jul 12 18:37:29 2017 +0800

----------------------------------------------------------------------
 tools/bin/hawq_ctl | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/80e8322c/tools/bin/hawq_ctl
----------------------------------------------------------------------
diff --git a/tools/bin/hawq_ctl b/tools/bin/hawq_ctl
index 5fa40af..f47b6fe 100755
--- a/tools/bin/hawq_ctl
+++ b/tools/bin/hawq_ctl
@@ -920,9 +920,16 @@ class HawqStop:
                       (source_hawq_env, self.GPHOME, self.segment_data_directory, log_filename)
             return cmd_str
         else:
+            # If stop cluster, firstly master stopped, then segment maybe hung at recv()
from master.
+            # So here change segment stop mode from smart to fast, so that segment don't
wait
+            # connection from master to be closed.
+            seg_stop_mod = self.stop_mode
+            if(self.node_type == 'cluster' and seg_stop_mod =='smart'):
+                seg_stop_mod = 'fast'
+
             cmd_str = "%s; %s/bin/pg_ctl stop -w -t %s -D %s -l %s/pg_log/startup.log -m
%s >> %s" % \
                       (source_hawq_env, self.GPHOME, self.timeout, self.segment_data_directory,
-                       self.segment_data_directory, self.stop_mode, log_filename)
+                       self.segment_data_directory, seg_stop_mod, log_filename)
             return cmd_str
 
     def _stop_segment(self):


Mime
View raw message