Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 79a8600

Browse files
knizhnikkelvich
authored andcommitted
Rollback all prepared transaction
1 parent 2e16689 commit 79a8600

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

arbiter.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,7 @@ static int MtmConnectSocket(int node, int port, int timeout)
473473
if (BIT_CHECK(resp.disabledNodeMask, MtmNodeId-1)) {
474474
elog(WARNING, "Node %d thinks that I was dead", resp.node);
475475
BIT_SET(Mtm->disabledNodeMask, MtmNodeId-1);
476+
MtmRollbackAllPreparedTransactions();
476477
MtmSwitchClusterMode(MTM_RECOVERY);
477478
}
478479
MtmUnlock();

multimaster.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,11 @@ void MtmJoinTransaction(GlobalTransactionId* gtid, csn_t globalSnapshot)
10431043
}
10441044
}
10451045

1046+
void MtmRollbackAllPreparedTransactions(void)
1047+
{
1048+
}
1049+
1050+
10461051
void MtmSetCurrentTransactionGID(char const* gid)
10471052
{
10481053
MTM_LOG3("Set current transaction xid=%d GID %s", MtmTx.xid, gid);

multimaster.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ extern void MtmUpdateLsnMapping(int nodeId, XLogRecPtr endLsn);
281281
extern XLogRecPtr MtmGetFlushPosition(int nodeId);
282282
extern void MtmWatchdog(void);
283283
extern void MtmCheckHeartbeat(void);
284+
extern void MtmRollbackAllPreparedTransactions(void);
284285

285286

286287

0 commit comments

Comments
 (0)