Skip to content

Commit a70b350

Browse files
committed
Eliminate recursion
1 parent ff1651b commit a70b350

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/multimaster/multimaster.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -990,11 +990,11 @@ bool MultimasterIsExternalTransaction(TransactionId xid)
990990
ExternalTrans* et;
991991
bool result = false;
992992
LWLockAcquire(dtm->hashLock, LW_EXCLUSIVE);
993-
et = hash_search(external_trans, &DtmNextXid, HASH_FIND, NULL);
993+
et = hash_search(external_trans, &xid, HASH_FIND, NULL);
994994
if (et != NULL) {
995995
result = true;
996996
if (--et->count == 0) {
997-
hash_search(external_trans, &DtmNextXid, HASH_REMOVE, NULL);
997+
hash_search(external_trans, &xid, HASH_REMOVE, NULL);
998998
}
999999
}
10001000
LWLockRelease(dtm->hashLock);

0 commit comments

Comments
 (0)