Content-Length: 269150 | pFad | http://github.com/postgrespro/postgres_cluster/commit/5ee48f49c122f6c2faf25e19238357e0235c6e63

AB Check for transaction status before waiting latch · postgrespro/postgres_cluster@5ee48f4 · GitHub
Skip to content

Commit 5ee48f4

Browse files
committed
Check for transaction status before waiting latch
1 parent 9e7d476 commit 5ee48f4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

contrib/mmts/multimaster.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,8 +801,13 @@ MtmPostPrepareTransaction(MtmCurrentTrans* x)
801801
int nConfigChanges = Mtm->nConfigChanges;
802802
/* wait votes from all nodes */
803803
while (!ts->votingCompleted) {
804-
MtmWatchdog();
805804
MtmUnlock();
805+
MtmWatchdog();
806+
if (ts->status == TRANSACTION_STATUS_ABORTED) {
807+
elog(WARNING, "Transaction %d(%s) is aborted by watchdog", x->xid, x->gid);
808+
x->status = TRANSACTION_STATUS_ABORTED;
809+
return;
810+
}
806811
result = WaitLatch(&MyProc->procLatch, WL_LATCH_SET|WL_TIMEOUT, timeout);
807812
if (result & WL_LATCH_SET) {
808813
ResetLatch(&MyProc->procLatch);

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/5ee48f49c122f6c2faf25e19238357e0235c6e63

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy