@@ -1348,7 +1348,7 @@ bool MtmRefreshClusterStatus(bool nowait)
1348
1348
int clique_size ;
1349
1349
int i ;
1350
1350
1351
- if (!MtmUseRaftable || ! MtmBuildConnectivityMatrix (matrix , nowait )) {
1351
+ if (!MtmBuildConnectivityMatrix (matrix , nowait )) {
1352
1352
/* RAFT is not available */
1353
1353
return false;
1354
1354
}
@@ -1437,11 +1437,12 @@ void MtmOnNodeDisconnect(int nodeId)
1437
1437
BIT_SET (Mtm -> reconnectMask , nodeId - 1 );
1438
1438
MtmUnlock ();
1439
1439
1440
- RaftableSet (psprintf ("node-mask-%d" , MtmNodeId ), & Mtm -> connectivityMask , sizeof Mtm -> connectivityMask , false);
1440
+ RaftableSet (psprintf ("node-mask-%d" , MtmNodeId ), & Mtm -> connectivityMask , sizeof Mtm -> connectivityMask , true); /* false); -- TODO: raftable is hanged with nowait=true */
1441
1441
1442
1442
MtmSleep (MSEC_TO_USEC (MtmRaftPollDelay ));
1443
1443
1444
- if (!MtmRefreshClusterStatus (false)) {
1444
+ if (!MtmUseRaftable )
1445
+ {
1445
1446
MtmLock (LW_EXCLUSIVE );
1446
1447
if (!BIT_CHECK (Mtm -> disabledNodeMask , nodeId - 1 )) {
1447
1448
MtmDisableNode (nodeId );
@@ -1458,7 +1459,9 @@ void MtmOnNodeDisconnect(int nodeId)
1458
1459
}
1459
1460
}
1460
1461
MtmUnlock ();
1461
- }
1462
+ } else {
1463
+ MtmRefreshClusterStatus (true); /* false); -- TODO: raftable can handg in nowait=true */
1464
+ }
1462
1465
}
1463
1466
1464
1467
void MtmOnNodeConnect (int nodeId )
@@ -1468,7 +1471,7 @@ void MtmOnNodeConnect(int nodeId)
1468
1471
MtmUnlock ();
1469
1472
1470
1473
MTM_LOG1 ("Reconnect node %d" , nodeId );
1471
- RaftableSet (psprintf ("node-mask-%d" , MtmNodeId ), & Mtm -> connectivityMask , sizeof Mtm -> connectivityMask , false);
1474
+ RaftableSet (psprintf ("node-mask-%d" , MtmNodeId ), & Mtm -> connectivityMask , sizeof Mtm -> connectivityMask , true); /* false); -- TODO: raftable is hanged with nowait=true */
1472
1475
}
1473
1476
1474
1477
0 commit comments