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

Commitaface56

Browse files
knizhnikkelvich
authored andcommitted
Undo changes around MtmRecoveryCaughtUp
1 parent50a052c commitaface56

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

‎multimaster.c

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

‎pglogical_apply.c

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

502502
/* read flags */
503503
flags=pq_getmsgbyte(in);
504504
MtmReplicationNode=pq_getmsgbyte(in);
505-
/*caughtUp = pq_getmsgbyte(in) != 0;*/
505+
caughtUp=pq_getmsgbyte(in)!=0;
506506

507507
/* read fields */
508508
replorigin_session_origin_lsn=pq_getmsgint64(in);/* commit_lsn */

‎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