Skip to content

Commit 025f3fd

Browse files
knizhnikkelvich
authored andcommitted
Fix recovery completed message handling
1 parent 753b232 commit 025f3fd

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

contrib/mmts/multimaster.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3298,6 +3298,7 @@ void MtmRecoverNode(int nodeId)
32983298
{
32993299
Assert(BIT_CHECK(Mtm->disabledNodeMask, nodeId-1));
33003300
BIT_CLEAR(Mtm->stoppedNodeMask, nodeId-1);
3301+
BIT_CLEAR(Mtm->stalledNodeMask, nodeId-1);
33013302
}
33023303
MtmUnlock();
33033304

@@ -3556,8 +3557,8 @@ MtmReplicationRowFilterHook(struct PGLogicalRowFilterArgs* args)
35563557
* Filter received transactions at destination side.
35573558
* This function is executed by receiver,
35583559
* so there are no race conditions and it is possible to update nodes[i].restartLSN without lock.
3559-
* It is more efficient to filter records at senders size (done by MtmReplicationTxnFilterHook) to avoid sending useless data through network. But asynchronous nature of
3560-
* logical replications makes it not possible to guarantee (at least I failed to do it)
3560+
* It is more efficient to filter records at senders size (done by MtmReplicationTxnFilterHook) to avoid sending useless data through network.
3561+
* But asynchronous nature of logical replications makes it not possible to guarantee (at least I failed to do it)
35613562
* that replica do not receive deteriorated data.
35623563
*/
35633564
bool MtmFilterTransaction(char* record, int size)

contrib/mmts/pglogical_apply.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,7 @@ void MtmExecutor(void* work, size_t size)
11191119
case 'Z':
11201120
{
11211121
MtmRecoveryCompleted();
1122-
continue;
1122+
break;
11231123
}
11241124
default:
11251125
elog(ERROR, "unknown action of type %c", action);

contrib/mmts/pglogical_proto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ pglogical_write_commit(StringInfo out, PGLogicalOutputData *data,
182182
{
183183
uint8 event = 0;
184184

185-
MTM_LOG1("%d: pglogical_write_commit XID=%ld node=%d restart_decoding_lsn=%lx first_lsn=%lx end_lsn=%lx confirmed_flush=%lx",
185+
MTM_LOG2("%d: pglogical_write_commit XID=%ld node=%d restart_decoding_lsn=%lx first_lsn=%lx end_lsn=%lx confirmed_flush=%lx",
186186
MyProcPid, (long)txn->xid, MtmReplicationNodeId, txn->restart_decoding_lsn, txn->first_lsn, txn->end_lsn, MyReplicationSlot->data.confirmed_flush);
187187

188188

contrib/mmts/tests2/test_recovery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def tearDownClass(self):
8787
print('tearDown')
8888
self.client.stop()
8989
# XXX: check nodes data identity here
90-
subprocess.check_call(['docker-compose','down'])
90+
# subprocess.check_call(['docker-compose','down'])
9191

9292
def setUp(self):
9393
warnings.simplefilter("ignore", ResourceWarning)

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