diff --git a/fdbserver/DataDistribution.actor.cpp b/fdbserver/DataDistribution.actor.cpp index 101ac0d5a4..4f258bbd50 100644 --- a/fdbserver/DataDistribution.actor.cpp +++ b/fdbserver/DataDistribution.actor.cpp @@ -468,7 +468,6 @@ struct DDTeamCollection { Promise serverTrackerErrorOut; AsyncVar recruitingStream; Debouncer restartRecruiting; - Promise hasTeams; int healthyTeamCount; PromiseStream zeroHealthyTeams; @@ -562,7 +561,6 @@ struct DDTeamCollection { // use keys, src, dest, metrics, priority, system load, etc.. to decide... ACTOR Future getTeam( DDTeamCollection* self, GetTeamRequest req ) { try { - Void _ = wait( self->hasTeams.getFuture() ); Void _ = wait( self->checkBuildTeams( self ) ); // Select the best team @@ -634,7 +632,10 @@ struct DDTeamCollection { } } - ASSERT( self->teams.size() ); + if( !self->teams.size() ) { + req.reply.send( Optional>() ); + return Void(); + } if( req.wantsTrueBest ) { ASSERT( !bestOption.present() ); @@ -730,10 +731,6 @@ struct DDTeamCollection { addTeam(t->begin(), t->end() ); } - if( teams.size() && hasTeams.canBeSet() ) { - hasTeams.send(Void()); - } - addSubsetOfEmergencyTeams(); } @@ -1040,10 +1037,6 @@ struct DDTeamCollection { //Let all of these changes get worked out before responding to the get team request Void _ = wait( delay(0, TaskDataDistributionLaunch) ); - if( self->teams.size() && self->hasTeams.canBeSet() ) { - self->hasTeams.send(Void()); - } - return Void(); }