From 8f4482f9b727067df4255d4d733a95199c1dab15 Mon Sep 17 00:00:00 2001 From: Ashwin Agrawal Date: Mon, 10 Apr 2017 16:58:10 -0700 Subject: [PATCH] Remove dead isXmax argument to Snapshot functions. --- src/backend/cdb/cdbdistributedsnapshot.c | 3 +-- src/backend/utils/time/tqual.c | 15 ++++++--------- src/include/cdb/cdbdistributedsnapshot.h | 3 +-- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/backend/cdb/cdbdistributedsnapshot.c b/src/backend/cdb/cdbdistributedsnapshot.c index 135832c56f..b78a15da71 100644 --- a/src/backend/cdb/cdbdistributedsnapshot.c +++ b/src/backend/cdb/cdbdistributedsnapshot.c @@ -27,8 +27,7 @@ DistributedSnapshotCommitted DistributedSnapshotWithLocalMapping_CommittedTest( DistributedSnapshotWithLocalMapping *dslm, - TransactionId localXid, - bool isXmax) + TransactionId localXid) { DistributedSnapshotHeader *header = &dslm->header; DistributedSnapshotMapEntry *inProgressEntryArray = dslm->inProgressEntryArray; diff --git a/src/backend/utils/time/tqual.c b/src/backend/utils/time/tqual.c index 6b9e835fe9..39d79bd98a 100644 --- a/src/backend/utils/time/tqual.c +++ b/src/backend/utils/time/tqual.c @@ -117,9 +117,9 @@ TransactionId RecentGlobalXmin = InvalidTransactionId; /* local functions */ -static bool XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot, bool isXmax, +static bool XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot, bool distributedSnapshotIgnore, bool *setDistributedSnapshotIgnore); -static bool XidInMVCCSnapshot_Local(TransactionId xid, Snapshot snapshot, bool isXmax); +static bool XidInMVCCSnapshot_Local(TransactionId xid, Snapshot snapshot); /* * Set the buffer dirty after setting t_infomask @@ -1112,7 +1112,6 @@ HeapTupleSatisfiesMVCC(Relation relation, HeapTupleHeader tuple, Snapshot snapsh */ inSnapshot = XidInMVCCSnapshot(HeapTupleHeaderGetXmin(tuple), snapshot, - /* isXmax */ false, ((tuple->t_infomask2 & HEAP_XMIN_DISTRIBUTED_SNAPSHOT_IGNORE) != 0), &setDistributedSnapshotIgnore); if (setDistributedSnapshotIgnore) @@ -1168,7 +1167,6 @@ HeapTupleSatisfiesMVCC(Relation relation, HeapTupleHeader tuple, Snapshot snapsh */ inSnapshot = XidInMVCCSnapshot(HeapTupleHeaderGetXmax(tuple), snapshot, - /* isXmax */ true, ((tuple->t_infomask2 & HEAP_XMAX_DISTRIBUTED_SNAPSHOT_IGNORE) != 0), &setDistributedSnapshotIgnore); if (setDistributedSnapshotIgnore) @@ -1531,7 +1529,7 @@ FreeXactSnapshot(void) * and local snapshots? */ static bool -XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot, bool isXmax, +XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot, bool distributedSnapshotIgnore, bool *setDistributedSnapshotIgnore) { Assert (setDistributedSnapshotIgnore != NULL); @@ -1555,8 +1553,7 @@ XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot, bool isXmax, distributedSnapshotCommitted = DistributedSnapshotWithLocalMapping_CommittedTest( &snapshot->distribSnapshotWithLocalMapping, - xid, - isXmax); + xid); switch (distributedSnapshotCommitted) { @@ -1581,7 +1578,7 @@ XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot, bool isXmax, } } - return XidInMVCCSnapshot_Local(xid, snapshot, isXmax); + return XidInMVCCSnapshot_Local(xid, snapshot); } /* @@ -1594,7 +1591,7 @@ XidInMVCCSnapshot(TransactionId xid, Snapshot snapshot, bool isXmax, * apply this for known-committed XIDs. */ static bool -XidInMVCCSnapshot_Local(TransactionId xid, Snapshot snapshot, bool isXmax) +XidInMVCCSnapshot_Local(TransactionId xid, Snapshot snapshot) { uint32 i; diff --git a/src/include/cdb/cdbdistributedsnapshot.h b/src/include/cdb/cdbdistributedsnapshot.h index b5574022a9..b2008a1d12 100644 --- a/src/include/cdb/cdbdistributedsnapshot.h +++ b/src/include/cdb/cdbdistributedsnapshot.h @@ -115,8 +115,7 @@ typedef enum extern DistributedSnapshotCommitted DistributedSnapshotWithLocalMapping_CommittedTest( DistributedSnapshotWithLocalMapping *dslm, - TransactionId localXid, - bool isXmax); + TransactionId localXid); extern void DistributedSnapshot_Reset( DistributedSnapshot *distributedSnapshot); -- GitLab