Content-Length: 266444 | pFad | http://github.com/postgrespro/postgres_cluster/commit/7aaa86ac8695803eaccfd0da45a54048c7cc35b5

9D Remove assert from MtmPrecommitTransaction · postgrespro/postgres_cluster@7aaa86a · GitHub
Skip to content

Commit 7aaa86a

Browse files
committed
Remove assert from MtmPrecommitTransaction
1 parent 9d60e38 commit 7aaa86a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

contrib/mmts/multimaster.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,8 +1175,10 @@ void MtmPrecommitTransaction(char const* gid)
11751175
MTM_ELOG(WARNING, "MtmPrecommitTransaction: transaction '%s' is not found", gid);
11761176
} else {
11771177
MtmTransState* ts = tm->state;
1178-
Assert(ts != NULL);
1179-
if (ts->status == TRANSACTION_STATUS_IN_PROGRESS) {
1178+
if (ts == NULL) {
1179+
MTM_ELOG(WARNING, "MtmPrecommitTransaction: transaction '%s' is not yet prepared, status %s", gid, MtmTxnStatusMnem[tm->status]);
1180+
MtmUnlock();
1181+
} else if (ts->status == TRANSACTION_STATUS_IN_PROGRESS) {
11801182
ts->status = TRANSACTION_STATUS_UNKNOWN;
11811183
ts->csn = MtmAssignCSN();
11821184
MtmAdjustSubtransactions(ts);

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/7aaa86ac8695803eaccfd0da45a54048c7cc35b5

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy