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

Commitacd3a72

Browse files
knizhnikkelvich
authored andcommitted
Do not send hearbeats when arbiter is existing
1 parentaaa5ee8 commitacd3a72

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

‎arbiter.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,15 @@ static char const* const messageText[] =
129129

130130
staticBackgroundWorkerMtmSender= {
131131
"mtm-sender",
132-
BGWORKER_SHMEM_ACCESS |BGWORKER_BACKEND_DATABASE_CONNECTION,/* do not need connection to the database */
132+
BGWORKER_SHMEM_ACCESS |BGWORKER_BACKEND_DATABASE_CONNECTION,
133133
BgWorkerStart_ConsistentState,
134134
MULTIMASTER_BGW_RESTART_TIMEOUT,
135135
MtmTransSender
136136
};
137137

138138
staticBackgroundWorkerMtmRecevier= {
139139
"mtm-receiver",
140-
BGWORKER_SHMEM_ACCESS |BGWORKER_BACKEND_DATABASE_CONNECTION,/* do not need connection to the database */
140+
BGWORKER_SHMEM_ACCESS |BGWORKER_BACKEND_DATABASE_CONNECTION,
141141
BgWorkerStart_ConsistentState,
142142
MULTIMASTER_BGW_RESTART_TIMEOUT,
143143
MtmTransReceiver
@@ -337,9 +337,11 @@ static void MtmCheckResponse(MtmArbiterMessage* resp)
337337
staticvoidMtmScheduleHeartbeat()
338338
{
339339
//Assert(!last_sent_heartbeat || last_sent_heartbeat + MSEC_TO_USEC(MtmHeartbeatRecvTimeout) >= MtmGetSystemTime());
340-
enable_timeout_after(heartbeat_timer,MtmHeartbeatSendTimeout);
341-
send_heartbeat= true;
342-
PGSemaphoreUnlock(&Mtm->votingSemaphore);
340+
if (!stop) {
341+
enable_timeout_after(heartbeat_timer,MtmHeartbeatSendTimeout);
342+
send_heartbeat= true;
343+
PGSemaphoreUnlock(&Mtm->votingSemaphore);
344+
}
343345
}
344346

345347
staticvoidMtmSendHeartbeat()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp