File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed
src/backend/access/transam Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -190,13 +190,21 @@ void* writer(void* arg)
190
190
i -= 1 ;
191
191
continue ;
192
192
}
193
- pipeline srcPipe (srcTx);
194
- pipeline dstPipe (dstTx);
195
- srcPipe.insert (" commit transaction" );
196
- dstPipe.insert (" commit transaction" );
197
- srcPipe.complete ();
198
- dstPipe.complete ();
199
-
193
+ try {
194
+ pipeline srcPipe (srcTx);
195
+ pipeline dstPipe (dstTx);
196
+ pipeline::query_id q1 = srcPipe.insert (" commit transaction" );
197
+ pipeline::query_id q2 = dstPipe.insert (" commit transaction" );
198
+ // srcPipe.complete();
199
+ // dstPipe.complete();
200
+ srcPipe.retrieve (q1);
201
+ dstPipe.retrieve (q2);
202
+ } catch (pqxx_exception const & x) {
203
+ t.aborts += 1 ;
204
+ i -= 1 ;
205
+ continue ;
206
+ }
207
+
200
208
t.proceeded += 1 ;
201
209
}
202
210
return NULL ;
Original file line number Diff line number Diff line change @@ -1313,6 +1313,7 @@ RecordTransactionCommit(void)
1313
1313
END_CRIT_SECTION ();
1314
1314
if (!committed ) {
1315
1315
CurrentTransactionState -> state = TRANS_ABORT ;
1316
+ CurrentTransactionState -> blockState = TBLOCK_ABORT_PENDING ;
1316
1317
elog (ERROR , "Transaction commit rejected by XTM" );
1317
1318
}
1318
1319
}
You can’t perform that action at this time.
0 commit comments