Skip to content

Commit e19bdea

Browse files
committed
More visibility traces
1 parent 32b7596 commit e19bdea

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

contrib/mmts/multimaster.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,6 @@ bool MtmXidInMVCCSnapshot(TransactionId xid, Snapshot snapshot)
375375
if (!MtmUseDtm) {
376376
return PgXidInMVCCSnapshot(xid, snapshot);
377377
}
378-
379378
MtmLock(LW_SHARED);
380379

381380
#if TRACE_SLEEP_TIME
@@ -427,6 +426,9 @@ bool MtmXidInMVCCSnapshot(TransactionId xid, Snapshot snapshot)
427426
else
428427
{
429428
bool invisible = ts->status != TRANSACTION_STATUS_COMMITTED;
429+
if (invisible != PgXidInMVCCSnapshot(xid, snapshot)) {
430+
fprintf(stderr, "Change visibility for XID %d(csn=%ld, status=%d) in snapshot %ld [%d,%d]\n", xid, ts->csn, ts->status, MtmTx.snapshot, snapshot->xmin, snapshot->xmax);
431+
}
430432
MTM_LOG4("%d: tuple with xid=%d(csn= %ld) is %s in snapshot %ld",
431433
MyProcPid, xid, ts->csn, invisible ? "rollbacked" : "committed", MtmTx.snapshot);
432434
MtmUnlock();

0 commit comments

Comments
 (0)