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

Commit0e9e9ca

Browse files
knizhnikkelvich
authored andcommitted
Avoid call raftable with infinite timeout
1 parentc3eb6bf commit0e9e9ca

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

‎multimaster.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,7 @@ bool MtmRefreshClusterStatus(bool nowait)
13471347
intclique_size;
13481348
inti;
13491349

1350-
if (!MtmUseRaftable|| !MtmBuildConnectivityMatrix(matrix,nowait)) {
1350+
if (!MtmBuildConnectivityMatrix(matrix,nowait)) {
13511351
/* RAFT is not available */
13521352
return false;
13531353
}
@@ -1436,11 +1436,12 @@ void MtmOnNodeDisconnect(int nodeId)
14361436
BIT_SET(Mtm->reconnectMask,nodeId-1);
14371437
MtmUnlock();
14381438

1439-
RaftableSet(psprintf("node-mask-%d",MtmNodeId),&Mtm->connectivityMask,sizeofMtm->connectivityMask, false);
1439+
RaftableSet(psprintf("node-mask-%d",MtmNodeId),&Mtm->connectivityMask,sizeofMtm->connectivityMask,true);/*false); -- TODO: raftable is hanged with nowait=true */
14401440

14411441
MtmSleep(MSEC_TO_USEC(MtmRaftPollDelay));
14421442

1443-
if (!MtmRefreshClusterStatus(false)) {
1443+
if (!MtmUseRaftable)
1444+
{
14441445
MtmLock(LW_EXCLUSIVE);
14451446
if (!BIT_CHECK(Mtm->disabledNodeMask,nodeId-1)) {
14461447
MtmDisableNode(nodeId);
@@ -1457,7 +1458,9 @@ void MtmOnNodeDisconnect(int nodeId)
14571458
}
14581459
}
14591460
MtmUnlock();
1460-
}
1461+
}else {
1462+
MtmRefreshClusterStatus(true);/* false); -- TODO: raftable can handg in nowait=true */
1463+
}
14611464
}
14621465

14631466
voidMtmOnNodeConnect(intnodeId)
@@ -1467,7 +1470,7 @@ void MtmOnNodeConnect(int nodeId)
14671470
MtmUnlock();
14681471

14691472
MTM_LOG1("Reconnect node %d",nodeId);
1470-
RaftableSet(psprintf("node-mask-%d",MtmNodeId),&Mtm->connectivityMask,sizeofMtm->connectivityMask, false);
1473+
RaftableSet(psprintf("node-mask-%d",MtmNodeId),&Mtm->connectivityMask,sizeofMtm->connectivityMask,true);/*false); -- TODO: raftable is hanged with nowait=true */
14711474
}
14721475

14731476

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp