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

Commitb97727a

Browse files
author
Andrei Krichinin
committed
fix LogLogicalMessage() in multimaster
1 parentf209c5b commitb97727a

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

‎src/ddl.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,8 @@ MtmProcessDDLCommand(char const *queryString, bool transactional,
680680
staticvoid
681681
MtmFinishDDLCommand()
682682
{
683-
LogLogicalMessage("E","",1, true);
683+
constchar*msg="MTM Finish DDL Command";
684+
LogLogicalMessage("E",msg,strlen(msg)+1, true);
684685
}
685686

686687

‎src/multimaster.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1389,6 +1389,7 @@ mtm_join_node(PG_FUNCTION_ARGS)
13891389
/* Await for workers finish and create syncpoints */
13901390
PG_TRY();
13911391
{
1392+
constchar*logmsg="MTM Syncpoint in join_node";
13921393

13931394
while (!MtmAllApplyWorkersFinished())
13941395
MtmSleep(USECS_PER_SEC /10);
@@ -1415,7 +1416,7 @@ mtm_join_node(PG_FUNCTION_ARGS)
14151416
LogLogicalMessage("S",msg,strlen(msg)+1, false);
14161417
replorigin_session_origin=InvalidRepOriginId;
14171418
}
1418-
LogLogicalMessage("S","",1, false);
1419+
LogLogicalMessage("S",logmsg,strlen(logmsg)+1, false);
14191420
}
14201421
PG_CATCH();
14211422
{

‎src/syncpoint.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,9 @@ MaybeLogSyncpoint(void)
103103
(GetInsertRecPtr()-Mtm->latestSyncpoint >=MtmSyncpointInterval*1024))
104104
{
105105
XLogRecPtrsyncpoint_lsn;
106+
constchar*msg="MTM syncpoint in MaybeLogsyncpoint";
106107

107-
syncpoint_lsn=LogLogicalMessage("S","",1, false);
108+
syncpoint_lsn=LogLogicalMessage("S",msg,strlen(msg)+1, false);
108109
Mtm->latestSyncpoint=syncpoint_lsn;
109110

110111
mtm_log(SyncpointCreated,
@@ -144,6 +145,7 @@ SyncpointRegister(int origin_node_id, XLogRecPtr origin_lsn,
144145
{
145146
char*sql;
146147
intrc;
148+
constchar*msg="MTM Syncpoint in SyncpointRegister";
147149

148150
/* Start tx */
149151
StartTransactionCommand();
@@ -156,7 +158,7 @@ SyncpointRegister(int origin_node_id, XLogRecPtr origin_lsn,
156158
* performed instead of 3PC and so receiver is not allowed to fail
157159
* applying this transaction and go ahead even in normal mode.
158160
*/
159-
LogLogicalMessage("B","",1, true);
161+
LogLogicalMessage("B",msg,strlen(msg)+1, true);
160162

161163
/* Save syncpoint */
162164
sql=psprintf("insert into mtm.syncpoints values "

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp