TODO(vinod): There should be a limit on the retries.
| 468 | |
| 469 | // TODO(vinod): There should be a limit on the retries. |
| 470 | void 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 | |
| 498 | TaskStatusUpdateStream* |
no outgoing calls
no test coverage detected