You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2017/05/26 15:15:17 UTC

mesos git commit: Made the executor driver drop some messages when not connected.

Repository: mesos
Updated Branches:
  refs/heads/master 2ca43f5af -> efb774cd9


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

Branch: refs/heads/master
Commit: efb774cd99711f8bcc38c79fcc3b487ca7a01d80
Parents: 2ca43f5
Author: Greg Mann <gr...@mesosphere.io>
Authored: Fri May 26 11:14:42 2017 -0400
Committer: Vinod Kone <vi...@gmail.com>
Committed: Fri May 26 11:14:42 2017 -0400

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


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