提交 9b5a9c01 编写于 作者: L Larry Hamel 提交者: Nadeem Ghani

Refactor conditional for ReloadDbConf command

-- removes match for "localhost" because a Greenplum cluster defined
with "localhost" as the name of a node will not work
Authored-by: NLarry Hamel <lhamel@pivotal.io>
上级 7342e05a
......@@ -752,15 +752,15 @@ class GpStop:
hostname = socket.gethostname()
logger.info("Signalling all postmaster processes to reload")
for db in dbList:
if db.getSegmentHostName() == "localhost" or db.getSegmentHostName() == hostname:
cmd = pg.ReloadDbConf(name="reload segment number " + str(db.getSegmentDbId())
, db=db
)
else:
cmd = pg.ReloadDbConf(name="reload segment number " + str(db.getSegmentDbId())
, db=db
, ctxt=REMOTE
, remoteHost=db.getSegmentHostName()
ctxt = REMOTE
remote_host = db.getSegmentHostName()
if db.getSegmentHostName() == hostname:
ctxt = LOCAL
remote_host = None
cmd = pg.ReloadDbConf(name="reload segment number " + str(db.getSegmentDbId()),
db=db,
ctxt=ctxt,
remoteHost=remote_host
)
self.pool.addCommand(cmd)
dispatch_count = dispatch_count + 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册