Skip to content

Commit a380fe6

Browse files
committed
Undo changes around MtmRecoveryCaughtUp
1 parent 4147df0 commit a380fe6

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
XLogRecPtr walLSN = GetXLogInsertRecPtr();
999999
MtmLock(LW_EXCLUSIVE);
1000-
#if 0
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+
} else if (!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
uint8 flags;
500500
csn_t csn;
501501
const char *gid = NULL;
502-
bool caughtUp = false;
502+
bool caughtUp;
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy