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:47:07 UTC

[5/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/a50ba766
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/a50ba766
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/a50ba766

Branch: refs/heads/1.2.x
Commit: a50ba766c7b1dc6af9f746b4e1256b5ea6db2b51
Parents: 7e3f7f5
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 18:24:53 2017 -0700

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/a50ba766/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;