fdbserver/ClusterController.actor.cpp
// Trys to send a reply to req with a worker (process) that a blob worker can be recruited on
// Otherwise, add the req to a list of outstanding reqs that will eventually be dealt with
Trys to send a reply to req with a worker (process) that a blob worker can be recruited on
Otherwise, add the req to a list of outstanding reqs that will eventually be dealt with
Trys to send a reply to req with a worker ( process ) that a blob worker can be recruited on Otherwise add the req to a list of outstanding reqs that will eventually be dealt with
void clusterRecruitBlobWorker(ClusterControllerData* self, RecruitBlobWorkerRequest req) {
	try {
		if (!self->gotProcessClasses)
			throw no_more_servers();
		auto worker = self->getBlobWorker(req);
		RecruitBlobWorkerReply rep;
		rep.worker = worker.interf;
		rep.processClass = worker.processClass;
		req.reply.send(rep);
	} catch (Error& e) {
		if (e.code() == error_code_no_more_servers) {
			self->outstandingBlobWorkerRequests.emplace_back(req, now() + SERVER_KNOBS->RECRUITMENT_TIMEOUT);
			TraceEvent(SevWarn, "RecruitBlobWorkerNotAvailable", self->id).error(e);
		} else {
			TraceEvent(SevError, "RecruitBlobWorkerError", self->id).error(e);
			throw; 
		}
	}
}
void clusterRecruitBlobWorker ( ClusterControllerData * self , RecruitBlobWorkerRequest req ) { try { if ( ! self -> gotProcessClasses ) throw no_more_servers ( ) ; auto worker = self -> getBlobWorker ( req ) ; RecruitBlobWorkerReply rep ; rep . worker = worker . interf ; rep . processClass = worker . processClass ; req . reply . send ( rep ) ; } catch ( Error & e ) { if ( e . code ( ) == error_code_no_more_servers ) { self -> outstandingBlobWorkerRequests . emplace_back ( req , now ( ) + SERVER_KNOBS -> RECRUITMENT_TIMEOUT ) ; TraceEvent ( SevWarn , " " , self -> id ) . error ( e ) ; } else { TraceEvent ( SevError , " " , self -> id ) . error ( e ) ; throw ; } } }
Trys to send a reply to req with a worker (process) that a blob worker can be recruited on
Otherwise, add the req to a list of outstanding reqs that will eventually be dealt with
Trys to send a reply to req with a worker ( process ) that a blob worker can be recruited on Otherwise add the req to a list of outstanding reqs that will eventually be dealt with
// Any other error will bring down the cluster controller