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

Commitb243021

Browse files
knizhnikkelvich
authored andcommitted
Close relation before processing of DDL messages
1 parent6a3ebc6 commitb243021

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

‎multimaster.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,7 +1276,7 @@ MtmPostPrepareTransaction(MtmCurrentTrans* x)
12761276
MtmUnlock();
12771277
if (x->isTwoPhase) {
12781278
if (x->status==TRANSACTION_STATUS_ABORTED) {
1279-
MTM_ELOG(ERROR,"Prepare of user's 2PC transaction %s (%llu) is aborted by DTM",x->gid, (long64)x->xid);
1279+
MTM_ELOG(WARNING,"Prepare of user's 2PC transaction %s (%llu) is aborted by DTM",x->gid, (long64)x->xid);
12801280
}
12811281
MtmResetTransaction();
12821282
}
@@ -3412,7 +3412,7 @@ void MtmFinishPreparedTransaction(MtmTransState* ts, bool commit)
34123412
MtmTx.isActive= true;
34133413
FinishPreparedTransaction(ts->gid,commit);
34143414
if (commit) {
3415-
MTM_LOG1("Distributed transaction %s (%lld) is committed at %lld with LSN=%lld",ts->gid, (long64)ts->xid,MtmGetCurrentTime(), (long64)GetXLogInsertRecPtr());
3415+
MTM_LOG2("Distributed transaction %s (%lld) is committed at %lld with LSN=%lld",ts->gid, (long64)ts->xid,MtmGetCurrentTime(), (long64)GetXLogInsertRecPtr());
34163416
}
34173417
if (!insideTransaction) {
34183418
CommitTransactionCommand();
@@ -4600,7 +4600,7 @@ static bool MtmTwoPhaseCommit(MtmCurrentTrans* x)
46004600
MTM_ELOG(ERROR,"Transaction %s (%llu) is aborted by DTM",x->gid, (long64)x->xid);
46014601
}else {
46024602
FinishPreparedTransaction(x->gid, true);
4603-
MTM_LOG1("Distributed transaction %s (%lld) is committed at %lld with LSN=%lld",x->gid, (long64)x->xid,MtmGetCurrentTime(), (long64)GetXLogInsertRecPtr());
4603+
MTM_LOG2("Distributed transaction %s (%lld) is committed at %lld with LSN=%lld",x->gid, (long64)x->xid,MtmGetCurrentTime(), (long64)GetXLogInsertRecPtr());
46044604
}
46054605
}
46064606
}
@@ -4868,7 +4868,6 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
48684868
caseTRANS_STMT_ROLLBACK_PREPARED:
48694869
Assert(!MtmTx.isTwoPhase);
48704870
strcpy(MtmTx.gid,stmt->gid);
4871-
//MtmTx.isTwoPhase = true;
48724871
break;
48734872
default:
48744873
break;

‎pglogical_apply.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,6 +1150,8 @@ void MtmExecutor(void* work, size_t size)
11501150
}
11511151
case'M':
11521152
{
1153+
close_rel(rel);
1154+
rel=NULL;
11531155
inside_transaction= !process_remote_message(&s);
11541156
break;
11551157
}

‎pglogical_proto.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ static void
171171
pglogical_write_message(StringInfoout,
172172
constchar*prefix,Sizesz,constchar*message)
173173
{
174+
MtmLastRelId=InvalidOid;
174175
switch (*prefix) {
175176
case'L':
176177
if (MtmIsRecoveredNode(MtmReplicationNodeId)) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp