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

Method backoff

src/executor/executor.cpp:575–595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

573 }
574
575 void backoff()
576 {
577 if (state == CONNECTED || state == SUBSCRIBING || state == SUBSCRIBED) {
578 return;
579 }
580
581 CHECK(state == DISCONNECTED || state == CONNECTING) << state;
582
583 CHECK(checkpoint);
584 CHECK_SOME(maxBackoff);
585
586 // Linearly backoff by picking a random duration between 0 and
587 // `maxBackoff`.
588 Duration backoff = maxBackoff.get() * ((double) os::random() / RAND_MAX);
589
590 VLOG(1) << "Will retry connecting with the agent again in " << backoff;
591
592 connect();
593
594 delay(backoff, self(), &Self::backoff);
595 }
596
597 Future<Nothing> _receive()
598 {

Callers

nothing calls this directly

Calls 4

randomFunction · 0.85
connectFunction · 0.50
delayFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected