File tree Expand file tree Collapse file tree 3 files changed +19
-15
lines changed
src/backend/access/transam Expand file tree Collapse file tree 3 files changed +19
-15
lines changed Original file line number Diff line number Diff line change @@ -1133,7 +1133,7 @@ MtmPostPrepareTransaction(MtmCurrentTrans* x)
1133
1133
MTM_TXTRACE (x , "recovery? 5" );
1134
1134
MtmResetTransaction ();
1135
1135
MTM_TXTRACE (x , "recovery? 6" );
1136
- } else {
1136
+ } else if (! ts -> isLocal ) {
1137
1137
MTM_TXTRACE (x , "not recovery?" );
1138
1138
Mtm2PCVoting (x , ts );
1139
1139
MtmUnlock ();
@@ -1170,18 +1170,19 @@ MtmPreCommitPreparedTransaction(MtmCurrentTrans* x)
1170
1170
ts = tm -> state ;
1171
1171
1172
1172
Assert (MtmIsCoordinator (ts ));
1173
+ if (!ts -> isLocal ) {
1174
+ ts -> votingCompleted = false;
1175
+ ts -> votedMask = 0 ;
1176
+ ts -> procno = MyProc -> pgprocno ;
1177
+ MTM_LOG2 ("Coordinator of transaction %s sends MSG_PRECOMMIT" , ts -> gid );
1178
+ Assert (replorigin_session_origin == InvalidRepOriginId );
1179
+ MtmUnlock ();
1180
+ SetPreparedTransactionState (ts -> gid , MULTIMASTER_PRECOMMITTED );
1181
+ //MtmSend2PCMessage(ts, MSG_PRECOMMIT);
1182
+ MtmLock (LW_EXCLUSIVE );
1173
1183
1174
- ts -> votingCompleted = false;
1175
- ts -> votedMask = 0 ;
1176
- ts -> procno = MyProc -> pgprocno ;
1177
- MTM_LOG2 ("Coordinator of transaction %s sends MSG_PRECOMMIT" , ts -> gid );
1178
- Assert (replorigin_session_origin == InvalidRepOriginId );
1179
- MtmUnlock ();
1180
- SetPreparedTransactionState (ts -> gid , MULTIMASTER_PRECOMMITTED );
1181
- //MtmSend2PCMessage(ts, MSG_PRECOMMIT);
1182
- MtmLock (LW_EXCLUSIVE );
1183
-
1184
- Mtm2PCVoting (x , ts );
1184
+ Mtm2PCVoting (x , ts );
1185
+ }
1185
1186
1186
1187
x -> xid = ts -> xid ;
1187
1188
x -> csn = ts -> csn ;
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ def setUpClass(self):
15
15
@classmethod
16
16
def tearDownClass (self ):
17
17
print ('tearDown' )
18
- subprocess .check_call (['docker-compose' ,'down' ])
18
+ # subprocess.check_call(['docker-compose','down'])
19
19
20
20
def test_regression (self ):
21
21
# XXX: make smth clever here
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ SubTransGetParent(TransactionId xid)
111
111
TransactionId parent ;
112
112
113
113
/* Can't ask about stuff that might not be around anymore */
114
- Assert (TransactionIdFollowsOrEquals (xid , TransactionXmin ));
114
+ // Assert(TransactionIdFollowsOrEquals(xid, TransactionXmin));
115
115
116
116
/* Bootstrap and frozen XIDs have no parent */
117
117
if (!TransactionIdIsNormal (xid ))
@@ -149,7 +149,10 @@ SubTransGetTopmostTransaction(TransactionId xid)
149
149
previousXid = xid ;
150
150
151
151
/* Can't ask about stuff that might not be around anymore */
152
- Assert (TransactionIdFollowsOrEquals (xid , TransactionXmin ));
152
+ if (!TransactionIdFollowsOrEquals (xid , TransactionXmin ))
153
+ {
154
+ return xid ;
155
+ }
153
156
154
157
while (TransactionIdIsValid (parentXid ))
155
158
{
You can’t perform that action at this time.
0 commit comments