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

Commita380fe6

Browse files
committed
Undo changes around MtmRecoveryCaughtUp
1 parent4147df0 commita380fe6

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

‎contrib/mmts/multimaster.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,6 @@ bool MtmRecoveryCaughtUp(int nodeId, XLogRecPtr slotLSN)
997997
if (MtmIsRecoveredNode(nodeId)) {
998998
XLogRecPtrwalLSN=GetXLogInsertRecPtr();
999999
MtmLock(LW_EXCLUSIVE);
1000-
#if0
10011000
if (slotLSN==walLSN) {
10021001
if (BIT_CHECK(Mtm->nodeLockerMask,nodeId-1)) {
10031002
elog(WARNING,"Node %d is caught-up",nodeId);
@@ -1011,9 +1010,7 @@ bool MtmRecoveryCaughtUp(int nodeId, XLogRecPtr slotLSN)
10111010
BIT_CLEAR(Mtm->disabledNodeMask,nodeId-1);
10121011
Mtm->nNodes+=1;
10131012
caughtUp= true;
1014-
}else
1015-
#endif
1016-
if (!BIT_CHECK(Mtm->nodeLockerMask,nodeId-1)
1013+
}elseif (!BIT_CHECK(Mtm->nodeLockerMask,nodeId-1)
10171014
&&slotLSN+MtmMinRecoveryLag>walLSN)
10181015
{
10191016
/*

‎contrib/mmts/pglogical_apply.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,12 +499,12 @@ process_remote_commit(StringInfo in)
499499
uint8flags;
500500
csn_tcsn;
501501
constchar*gid=NULL;
502-
boolcaughtUp= false;
502+
boolcaughtUp;
503503

504504
/* read flags */
505505
flags=pq_getmsgbyte(in);
506506
MtmReplicationNode=pq_getmsgbyte(in);
507-
/*caughtUp = pq_getmsgbyte(in) != 0;*/
507+
caughtUp=pq_getmsgbyte(in)!=0;
508508

509509
/* read fields */
510510
replorigin_session_origin_lsn=pq_getmsgint64(in);/* commit_lsn */

‎contrib/mmts/pglogical_proto.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,16 +147,14 @@ pglogical_write_commit(StringInfo out, PGLogicalOutputData *data,
147147
return;
148148
}
149149
}
150-
MtmRecoveryCaughtUp(MtmReplicationNodeId,txn->end_lsn);
151-
152150
pq_sendbyte(out,'C');/* sending COMMIT */
153151

154152
MTM_INFO("PGLOGICAL_SEND commit: event=%d, gid=%s, commit_lsn=%lx, txn->end_lsn=%lx, xlog=%lx\n",flags,txn->gid,commit_lsn,txn->end_lsn,GetXLogInsertRecPtr());
155153

156154
/* send the flags field */
157155
pq_sendbyte(out,flags);
158156
pq_sendbyte(out,MtmNodeId);
159-
/*pq_sendbyte(out, MtmRecoveryCaughtUp(MtmReplicationNodeId, txn->end_lsn));*/
157+
pq_sendbyte(out,MtmRecoveryCaughtUp(MtmReplicationNodeId,txn->end_lsn));
160158

161159
/* send fixed fields */
162160
pq_sendint64(out,commit_lsn);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp