File tree 2 files changed +18
-12
lines changed
2 files changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -776,17 +776,23 @@ static void MtmTransReceiver(Datum arg)
776
776
}
777
777
break ;
778
778
case MSG_PREPARED :
779
- Assert (ts -> status == TRANSACTION_STATUS_IN_PROGRESS );
780
- Assert (ts -> nVotes < Mtm -> nLiveNodes );
781
- if (msg -> csn > ts -> csn ) {
782
- ts -> csn = msg -> csn ;
783
- MtmSyncClock (ts -> csn );
784
- }
785
- if (++ ts -> nVotes == Mtm -> nLiveNodes ) {
786
- ts -> csn = MtmAssignCSN ();
787
- ts -> status = TRANSACTION_STATUS_UNKNOWN ;
788
- MtmWakeUpBackend (ts );
789
- }
779
+ if (ts -> status != TRANSACTION_STATUS_ABORTED ) {
780
+ Assert (ts -> status == TRANSACTION_STATUS_IN_PROGRESS );
781
+ Assert (ts -> nVotes < Mtm -> nLiveNodes );
782
+ if (msg -> csn > ts -> csn ) {
783
+ ts -> csn = msg -> csn ;
784
+ MtmSyncClock (ts -> csn );
785
+ }
786
+ if (++ ts -> nVotes == Mtm -> nLiveNodes ) {
787
+ ts -> csn = MtmAssignCSN ();
788
+ ts -> status = TRANSACTION_STATUS_UNKNOWN ;
789
+ MtmWakeUpBackend (ts );
790
+ }
791
+ } else {
792
+ if (++ ts -> nVotes == Mtm -> nLiveNodes ) {
793
+ MtmWakeUpBackend (ts );
794
+ }
795
+ }
790
796
break ;
791
797
default :
792
798
Assert (false);
Original file line number Diff line number Diff line change @@ -794,7 +794,7 @@ MtmPostPrepareTransaction(MtmCurrentTrans* x)
794
794
MtmResetTransaction (x );
795
795
} else {
796
796
time_t transTimeout = Max (Mtm2PCMinTimeout , (ts -> csn - ts -> snapshot )* Mtm2PCPrepareRatio /100000 ); /* usec->msec and percents */
797
- time_t timeout = transTimeout < MtmHeartbeatRecvTimeout ? transTimeout : MtmHeartbeatRecvTimeout ;
797
+ time_t timeout = Min ( transTimeout , MtmHeartbeatRecvTimeout ) ;
798
798
timestamp_t deadline = MtmGetSystemTime () + MSEC_TO_USEC (transTimeout );
799
799
int result = 0 ;
800
800
int nConfigChanges = Mtm -> nConfigChanges ;
You can’t perform that action at this time.
0 commit comments