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

Commit80fb551

Browse files
committed
Wait for gen with new node in join_node.
1 parent26db1c2 commit80fb551

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

‎src/multimaster.c‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,6 +1428,19 @@ mtm_join_node(PG_FUNCTION_ARGS)
14281428
}
14291429
PQclear(res);
14301430

1431+
/*
1432+
* FIXME: await for new node joining or there is a small probablity of
1433+
* this (alter_sequences) xact commit failure due to gen switch including
1434+
* new node.
1435+
*/
1436+
while (true)
1437+
{
1438+
MtmGenerationcurr_gen=MtmGetCurrentGen(false);
1439+
1440+
if (BIT_CHECK(curr_gen.members,new_node_id-1))
1441+
break;
1442+
MtmSleep(USECS_PER_SEC /10);
1443+
}
14311444
/* call mtm.alter_sequences since n_nodes is changed */
14321445
query=psprintf("select mtm.alter_sequences()");
14331446
rc=SPI_execute(query, false,0);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp