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

Method timeout

src/slave/task_status_update_manager.cpp:470–495  ·  view source on GitHub ↗

TODO(vinod): There should be a limit on the retries.

Source from the content-addressed store, hash-verified

468
469// TODO(vinod): There should be a limit on the retries.
470void TaskStatusUpdateManagerProcess::timeout(const Duration& duration)
471{
472 if (paused) {
473 return;
474 }
475
476 // Check and see if we should resend any status updates.
477 foreachkey (const FrameworkID& frameworkId, streams) {
478 foreachvalue (TaskStatusUpdateStream* stream, streams[frameworkId]) {
479 CHECK_NOTNULL(stream);
480 if (!stream->pending.empty()) {
481 CHECK_SOME(stream->timeout);
482 if (stream->timeout->expired()) {
483 const StatusUpdate& update = stream->pending.front();
484 LOG(WARNING) << "Resending task status update " << update;
485
486 // Bounded exponential backoff.
487 Duration duration_ =
488 std::min(duration * 2, STATUS_UPDATE_RETRY_INTERVAL_MAX);
489
490 stream->timeout = forward(update, duration_);
491 }
492 }
493 }
494 }
495}
496
497
498TaskStatusUpdateStream*

Callers 4

scheduleMethod · 0.45
getMetricsMethod · 0.45
pingTimeoutMethod · 0.45
forwardMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected