diff --git a/fdbserver/ClusterController.actor.cpp b/fdbserver/ClusterController.actor.cpp index 47f88a71d3..2f7af5c0c8 100644 --- a/fdbserver/ClusterController.actor.cpp +++ b/fdbserver/ClusterController.actor.cpp @@ -1286,7 +1286,7 @@ ACTOR Future clusterGetServerInfo(ClusterControllerData::DBInfo* db, UID k while (db->serverInfo->get().read().id == knownServerInfoID) { choose { - when (wait( db->serverInfo->onChange() )) {} + when (wait( yieldedFuture(db->serverInfo->onChange()) )) {} when (wait( delayJittered( 300 ) )) { break; } // The server might be long gone! } } diff --git a/fdbserver/Coordination.actor.cpp b/fdbserver/Coordination.actor.cpp index 3129ebac3f..7ee6dd542b 100644 --- a/fdbserver/Coordination.actor.cpp +++ b/fdbserver/Coordination.actor.cpp @@ -220,7 +220,7 @@ ACTOR Future openDatabase(ClientData* db, int* clientCount, ReferenceclientInfo->get().read().id == req.knownClientInfoID && !db->clientInfo->get().read().forward.present()) { choose { - when (wait( db->clientInfo->onChange() )) {} + when (wait( yieldedFuture(db->clientInfo->onChange()) )) {} when (wait( delayJittered( SERVER_KNOBS->CLIENT_REGISTER_INTERVAL ) )) { break; } // The client might be long gone! } } @@ -317,8 +317,10 @@ ACTOR Future leaderRegister(LeaderElectionRegInterface interf, Key key) { outInfo.forward = req.conn.toString(); clientData.clientInfo->set(CachedSerialization(outInfo)); req.reply.send( Void() ); - ASSERT(!hasConnectedClients->get()); - return Void(); + if(!hasConnectedClients->get()) { + return Void(); + } + nextInterval = Future(); } when ( wait(nextInterval.isValid() ? nextInterval : Never()) ) { if (!availableLeaders.size() && !availableCandidates.size() && !notify.size() &&