Add log about old primary after myself failover (#1058)
Sometims it is hard to see the old primary during a multi primaries failover, adding this log can help use to find the old primary node. Signed-off-by: Binbin <binloveplay1314@qq.com> Co-authored-by: Ping Xie <pingxie@outlook.com>
This commit is contained in:
parent
56fd97733b
commit
7fab15795f
@ -4476,7 +4476,10 @@ void clusterFailoverReplaceYourPrimary(void) {
|
||||
|
||||
if (clusterNodeIsPrimary(myself) || old_primary == NULL) return;
|
||||
|
||||
/* 1) Turn this node into a primary . */
|
||||
serverLog(LL_NOTICE, "Setting myself to primary in shard %.40s after failover; my old primary is %.40s (%s)",
|
||||
myself->shard_id, old_primary->name, old_primary->human_nodename);
|
||||
|
||||
/* 1) Turn this node into a primary. */
|
||||
clusterSetNodeAsPrimary(myself);
|
||||
replicationUnsetPrimary();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user