Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitea73b2b

Browse files
committed
Use MtmIsBroadcast to prevent recursion in MtmProcessDDLCommand
1 parentf4ff5be commitea73b2b

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
@@ -874,7 +874,9 @@ void MtmJoinTransaction(GlobalTransactionId* gtid, csn_t globalSnapshot)
874874
}
875875
if (!TransactionIdIsValid(gtid->xid)) {
876876
/* In case of recovery InvalidTransactionId is passed */
877-
Assert(Mtm->status==MTM_RECOVERY);
877+
if (Mtm->status!=MTM_RECOVERY) {
878+
elog(PANIC,"Node %d tries to recover node %d which is in %s mode",MtmReplicationNode,MtmNodeId,MtmNodeStatusMnem[Mtm->status]);
879+
}
878880
}elseif (Mtm->status==MTM_RECOVERY) {
879881
/* When recovery is completed we get normal transaction ID and switch to normal mode */
880882
MtmRecoveryCompleted();
@@ -2303,7 +2305,7 @@ static bool MtmProcessDDLCommand(char const* queryString)
23032305
rel=heap_openrv_extended(rv,RowExclusiveLock, true);
23042306

23052307
if (rel==NULL) {
2306-
if (!IsTransactionBlock()) {
2308+
if (!MtmIsBroadcast()) {
23072309
MtmBroadcastUtilityStmt(queryString, false);
23082310
return true;
23092311
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp