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

Method finished

src/log/recover.cpp:314–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312 }
313
314 void finished(const Future<Option<RecoverResponse>>& future)
315 {
316 if (future.isDiscarded()) {
317 // We use the boolean flag 'terminating' to distinguish between
318 // a user initiated discard and a timeout induced discard. In
319 // the case of a user initiated discard, the flag 'terminating'
320 // will be set to true in 'Self::discard()'.
321 if (terminating) {
322 promise.discard();
323 terminate(self());
324 } else {
325 VLOG(2) << "Log recovery timed out waiting for responses, retrying";
326
327 start(); // Re-run the recover protocol after timeout.
328 }
329 } else if (future.isFailed()) {
330 promise.fail(future.failure());
331 terminate(self());
332 } else {
333 promise.set(future.get());
334 terminate(self());
335 }
336 }
337
338 const size_t quorum;
339 const Shared<Network> network;

Callers

nothing calls this directly

Calls 9

startFunction · 0.85
isDiscardedMethod · 0.80
isFailedMethod · 0.80
failureMethod · 0.80
terminateFunction · 0.50
discardMethod · 0.45
failMethod · 0.45
setMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected