You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2017/05/27 01:19:55 UTC

[6/9] mesos git commit: Made the executor driver drop some messages when not connected.

Made the executor driver drop some messages when not connected.

This patch updates the executor driver to drop RunTaskMessages,
FrameworkMessages, and StatusUpdateAcknowledgements when it is
not connected to the agent. This facilitates executor reconnect
retry logic which is being added to the agent.

Review: https://reviews.apache.org/r/59582/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/a77d2423
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/a77d2423
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/a77d2423

Branch: refs/heads/1.3.x
Commit: a77d2423c2cc0153c87a8d73ac195e600218453d
Parents: 6709996
Author: Greg Mann <gr...@mesosphere.io>
Authored: Fri May 26 11:14:42 2017 -0400
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Fri May 26 17:54:10 2017 -0700

----------------------------------------------------------------------
 src/exec/exec.cpp | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/a77d2423/src/exec/exec.cpp
----------------------------------------------------------------------
diff --git a/src/exec/exec.cpp b/src/exec/exec.cpp
index f36e370..65c4575 100644
--- a/src/exec/exec.cpp
+++ b/src/exec/exec.cpp
@@ -317,6 +317,12 @@ protected:
       return;
     }
 
+    if (!connected) {
+      VLOG(1) << "Ignoring run task message for task " << task.task_id()
+              << " because the driver is disconnected!";
+      return;
+    }
+
     CHECK(!tasks.contains(task.task_id()))
       << "Unexpected duplicate task " << task.task_id();
 
@@ -371,6 +377,14 @@ protected:
       return;
     }
 
+    if (!connected) {
+      VLOG(1) << "Ignoring status update acknowledgement "
+              << uuid_.get() << " for task " << taskId
+              << " of framework " << frameworkId
+              << " because the driver is disconnected!";
+      return;
+    }
+
     VLOG(1) << "Executor received status update acknowledgement "
             << uuid_.get() << " for task " << taskId
             << " of framework " << frameworkId;
@@ -393,6 +407,12 @@ protected:
       return;
     }
 
+    if (!connected) {
+      VLOG(1) << "Ignoring framework message because "
+              << "the driver is disconnected!";
+      return;
+    }
+
     VLOG(1) << "Executor received framework message";
 
     Stopwatch stopwatch;