From eb1adbb8fe618b2b1f94ea4fe810e5d40611cb91 Mon Sep 17 00:00:00 2001 From: Marbin Tan Date: Wed, 1 Mar 2017 09:15:34 -0800 Subject: [PATCH] Ensure that we stop the master segment after starting it when rebuilding --- gpMgmt/bin/gppylib/operations/persistent_rebuild.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gpMgmt/bin/gppylib/operations/persistent_rebuild.py b/gpMgmt/bin/gppylib/operations/persistent_rebuild.py index 0886d693f8..cc22bb1fca 100644 --- a/gpMgmt/bin/gppylib/operations/persistent_rebuild.py +++ b/gpMgmt/bin/gppylib/operations/persistent_rebuild.py @@ -1110,7 +1110,11 @@ class RebuildPersistentTables(Operation): cmd = GpStart('Start the greenplum databse') cmd.run(validateAfter=True) if admin_mode: - cmd = GpStop('Stop the greenplum database', masterOnly=True) + # NOTE: There might be a case where gpstart has a lingering idle + # connection that's not fully closed before gpstop happens. + # We already guaranteed that we did a fresh start, therefore, we + # will stop can immediately. + cmd = GpStop('Stop the greenplum database', masterOnly=True, force=True) cmd.run(validateAfter=True) cmd = GpStart('Start the greenplum master in admin mode', masterOnly=True) cmd.run(validateAfter=True) -- GitLab