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

Commit9657046

Browse files
knizhnikkelvich
authored andcommitted
Do not update restartLSN for prepare transaction records
1 parent4ea829d commit9657046

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎multimaster.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3723,7 +3723,6 @@ bool MtmFilterTransaction(char* record, int size)
37233723
switch (event)
37243724
{
37253725
casePGLOGICAL_PREPARE:
3726-
// return false;
37273726
casePGLOGICAL_PRECOMMIT_PREPARED:
37283727
casePGLOGICAL_ABORT_PREPARED:
37293728
gid=pq_getmsgstring(&s);
@@ -3738,7 +3737,10 @@ bool MtmFilterTransaction(char* record, int size)
37383737
restart_lsn=origin_node==MtmReplicationNodeId ?end_lsn :origin_lsn;
37393738
if (Mtm->nodes[origin_node-1].restartLSN<restart_lsn) {
37403739
MTM_LOG2("[restartlsn] node %d: %llx -> %llx (MtmFilterTransaction)",MtmReplicationNodeId,Mtm->nodes[MtmReplicationNodeId-1].restartLSN,restart_lsn);
3741-
Mtm->nodes[origin_node-1].restartLSN=restart_lsn;
3740+
if (event!=PGLOGICAL_PREPARE) {
3741+
/* Transactions can be prepared in different order, so to avoid loosing transactions we should not update restartLsn for them */
3742+
Mtm->nodes[origin_node-1].restartLSN=restart_lsn;
3743+
}
37423744
}else {
37433745
duplicate= true;
37443746
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp