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

Commita0acd7b

Browse files
knizhnikkelvich
authored andcommitted
Use MtmIsBroadcast to prevent recursion in MtmProcessDDLCommand
1 parent535eae1 commita0acd7b

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
@@ -877,7 +877,9 @@ void MtmJoinTransaction(GlobalTransactionId* gtid, csn_t globalSnapshot)
877877
}
878878
if (!TransactionIdIsValid(gtid->xid)) {
879879
/* In case of recovery InvalidTransactionId is passed */
880-
Assert(Mtm->status==MTM_RECOVERY);
880+
if (Mtm->status!=MTM_RECOVERY) {
881+
elog(PANIC,"Node %d tries to recover node %d which is in %s mode",MtmReplicationNode,MtmNodeId,MtmNodeStatusMnem[Mtm->status]);
882+
}
881883
}elseif (Mtm->status==MTM_RECOVERY) {
882884
/* When recovery is completed we get normal transaction ID and switch to normal mode */
883885
MtmRecoveryCompleted();
@@ -2340,7 +2342,7 @@ static bool MtmProcessDDLCommand(char const* queryString)
23402342
rel=heap_openrv_extended(rv,RowExclusiveLock, true);
23412343

23422344
if (rel==NULL) {
2343-
if (!IsTransactionBlock()) {
2345+
if (!MtmIsBroadcast()) {
23442346
MtmBroadcastUtilityStmt(queryString, false);
23452347
return true;
23462348
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp