File tree 1 file changed +19
-2
lines changed 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,22 @@ MtmSetClusterStatus(MtmNodeStatus status)
83
83
Mtm -> recoveryCount ++ ; /* this will restart replication connection */
84
84
}
85
85
86
+ /*
87
+ * Check saved referee decision and clean it
88
+ */
89
+ if (status == MTM_ONLINE )
90
+ {
91
+ if (!Mtm -> refereeGrant && MtmRefereeReadSaved () > 0 )
92
+ {
93
+ /*
94
+ * We booted after being with refereeGrant,
95
+ * but now have ordinary majority.
96
+ */
97
+ MtmPollStatusOfPreparedTransactions (true);
98
+ MtmRefereeClearWinner ();
99
+ }
100
+ }
101
+
86
102
Mtm -> status = status ;
87
103
}
88
104
@@ -482,8 +498,9 @@ MtmRefreshClusterStatus()
482
498
* because we can clean old value before failed node starts it recovery and that node
483
499
* can get refereeGrant before start of walsender, so it start in recovered mode.
484
500
*/
485
- if (MtmRefereeConnStr && * MtmRefereeConnStr && Mtm -> refereeWinnerId &&
486
- countZeroBits (Mtm -> disabledNodeMask , Mtm -> nAllNodes ) == Mtm -> nAllNodes )
501
+ if (MtmRefereeConnStr && * MtmRefereeConnStr && Mtm -> refereeWinnerId &&
502
+ countZeroBits (Mtm -> disabledNodeMask , Mtm -> nAllNodes ) == Mtm -> nAllNodes &&
503
+ MtmGetCurrentStatus () == MTM_ONLINE ) /* restrict this actions only to major -> online transition */
487
504
{
488
505
if (MtmRefereeClearWinner ())
489
506
{
You can’t perform that action at this time.
0 commit comments