Content-Length: 263789 | pFad | http://github.com/postgrespro/postgres_cluster/commit/e2d104e8cf983068b0d0248735707da8d7e1d7fd

6E Remove assert from MtmPrecommitTransaction · postgrespro/postgres_cluster@e2d104e · GitHub
Skip to content

Commit e2d104e

Browse files
knizhnikkelvich
authored andcommitted
Remove assert from MtmPrecommitTransaction
1 parent 218f2c8 commit e2d104e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

multimaster.c

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

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy