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