Skip to content

Commit

Permalink
This is an additional patch to fix the bug 3598637. The patch corrects
Browse files Browse the repository at this point in the history
the lock to relase, as well as restoring memory context at error.

	modified:   src/gtm/main/gtm_txn.c
  • Loading branch information
Koichi Suzuki committed Jan 7, 2013
1 parent 56268e4 commit 3bcdab7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gtm/main/gtm_txn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1240,6 +1240,7 @@ GTM_BkupBeginTransactionGetGXIDMulti(char *coord_name,
GTM_RWLockRelease(&GTMTransactions.gt_TransArrayLock);
elog(ERROR, "GTM_TransactionInfo already in use. Cannot assign the transaction: handle (%d).",
txn[ii]);
MemoryContextSwitchTo(oldContext);
return;
}
init_GTM_TransactionInfo(gtm_txninfo, coord_name, txn[ii], isolevel[ii], connid[ii], readonly[ii]);
Expand All @@ -1256,7 +1257,7 @@ GTM_BkupBeginTransactionGetGXIDMulti(char *coord_name,
}


GTM_RWLockRelease(&GTMTransactions.gt_XidGenLock);
GTM_RWLockRelease(&GTMTransactions.gt_TransArrayLock);
MemoryContextSwitchTo(oldContext);
}

Expand Down

0 comments on commit 3bcdab7

Please sign in to comment.