@@ -1028,6 +1028,7 @@ MtmPostPrepareTransaction(MtmCurrentTrans* x)
1028
1028
MTM_TXTRACE (x , "PostPrepareTransaction Start" );
1029
1029
1030
1030
if (!x -> isDistributed ) {
1031
+ MTM_TXTRACE (x , "not distributed?" );
1031
1032
return ;
1032
1033
}
1033
1034
@@ -1040,25 +1041,34 @@ MtmPostPrepareTransaction(MtmCurrentTrans* x)
1040
1041
Assert (ts != NULL );
1041
1042
//if (x->gid[0]) MTM_LOG1("Preparing transaction %d (%s) at %ld", x->xid, x->gid, MtmGetCurrentTime());
1042
1043
if (!MtmIsCoordinator (ts ) || Mtm -> status == MTM_RECOVERY ) {
1044
+ MTM_TXTRACE (x , "recovery?" );
1043
1045
Assert (x -> gid [0 ]);
1044
1046
ts -> votingCompleted = true;
1045
- if (Mtm -> status != MTM_RECOVERY || Mtm -> recoverySlot != MtmReplicationNodeId ) {
1047
+ MTM_TXTRACE (x , "recovery? 1" );
1048
+ if (Mtm -> status != MTM_RECOVERY || Mtm -> recoverySlot != MtmReplicationNodeId ) {
1049
+ MTM_TXTRACE (x , "recovery? 2" );
1046
1050
MtmSend2PCMessage (ts , MSG_PREPARED ); /* send notification to coordinator */
1047
1051
if (!MtmUseDtm ) {
1048
1052
ts -> status = TRANSACTION_STATUS_UNKNOWN ;
1049
1053
}
1050
1054
} else {
1055
+ MTM_TXTRACE (x , "recovery? 3" );
1051
1056
ts -> status = TRANSACTION_STATUS_UNKNOWN ;
1052
1057
}
1058
+ MTM_TXTRACE (x , "recovery? 4" );
1053
1059
MtmUnlock ();
1060
+ MTM_TXTRACE (x , "recovery? 5" );
1054
1061
MtmResetTransaction ();
1062
+ MTM_TXTRACE (x , "recovery? 6" );
1055
1063
} else {
1064
+ MTM_TXTRACE (x , "not recovery?" );
1056
1065
Mtm2PCVoting (x , ts );
1057
1066
MtmUnlock ();
1058
1067
if (x -> isTwoPhase ) {
1059
1068
MtmResetTransaction ();
1060
1069
}
1061
1070
}
1071
+ MTM_TXTRACE (x , "recovery? 7" );
1062
1072
//if (x->gid[0]) MTM_LOG1("Prepared transaction %d (%s) csn=%ld at %ld: %d", x->xid, x->gid, ts->csn, MtmGetCurrentTime(), ts->status);
1063
1073
if (Mtm -> inject2PCError == 3 ) {
1064
1074
Mtm -> inject2PCError = 0 ;
0 commit comments