MCPcopy Create free account
hub / github.com/apache/mesos / receive

Method receive

src/log/recover.cpp:169–183  ·  view source on GitHub ↗

Returns None if we need to re-run the protocol.

Source from the content-addressed store, hash-verified

167
168 // Returns None if we need to re-run the protocol.
169 Future<Option<RecoverResponse>> receive()
170 {
171 if (responses.empty()) {
172 // All responses have been received but we haven't received
173 // enough (i.e., a quorum of) responses from VOTING replicas to
174 // start the catch-up. We will re-run the recovery protocol.
175 return None();
176 }
177
178 // Instead of using a for loop here, we use select to process
179 // responses one after another so that we can ignore the rest if
180 // we have collected enough responses.
181 return select(responses)
182 .then(defer(self(), &Self::received, lambda::_1));
183 }
184
185 Future<Option<RecoverResponse>> received(
186 const Future<RecoverResponse>& future)

Callers

nothing calls this directly

Calls 5

NoneClass · 0.85
selectFunction · 0.85
deferFunction · 0.85
emptyMethod · 0.45
thenMethod · 0.45

Tested by

no test coverage detected