You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by an...@apache.org on 2016/10/04 02:45:40 UTC

[2/3] mesos git commit: Added `RecoveryInfo` struct to the agent.

Added `RecoveryInfo` struct to the agent.

This struct would container all the recovery related metadata
on the agent from now on. Eventually, we would add component
specific recovery information to this struct e.g, the executors
can now subscribe again with the agent etc.

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


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

Branch: refs/heads/1.0.x
Commit: 96a8d84d3fbf36e3b2227a697ceb23780c7d154c
Parents: 837bb4e
Author: Anand Mazumdar <an...@apache.org>
Authored: Thu Sep 29 16:37:53 2016 -0700
Committer: Anand Mazumdar <an...@apache.org>
Committed: Mon Oct 3 19:42:04 2016 -0700

----------------------------------------------------------------------
 src/slave/slave.cpp |  6 +++---
 src/slave/slave.hpp | 12 ++++++++----
 2 files changed, 11 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/96a8d84d/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 09be083..abec13b 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -3192,7 +3192,7 @@ void Slave::reregisterExecutorTimeout()
   }
 
   // Signal the end of recovery.
-  recovered.set(Nothing());
+  recoveryInfo.recovered.set(Nothing());
 }
 
 
@@ -4784,7 +4784,7 @@ Future<Nothing> Slave::_recover()
     // We set 'recovered' flag inside reregisterExecutorTimeout(),
     // so that when the slave re-registers with master it can
     // correctly inform the master about the launched tasks.
-    return recovered.future();
+    return recoveryInfo.recovered.future();
   }
 
   return Nothing();
@@ -4885,7 +4885,7 @@ void Slave::__recover(const Future<Nothing>& future)
     // doesn't happen within a timeout.
   }
 
-  recovered.set(Nothing()); // Signal recovery.
+  recoveryInfo.recovered.set(Nothing()); // Signal recovery.
 }
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/96a8d84d/src/slave/slave.hpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.hpp b/src/slave/slave.hpp
index 95223ec..10e097a 100644
--- a/src/slave/slave.hpp
+++ b/src/slave/slave.hpp
@@ -297,6 +297,14 @@ public:
     TERMINATING,  // Slave is shutting down.
   } state;
 
+  // Describes information about agent recovery.
+  struct RecoveryInfo
+  {
+    // Flag to indicate if recovery, including reconciling
+    // (i.e., reconnect/kill) with executors is finished.
+    process::Promise<Nothing> recovered;
+  } recoveryInfo;
+
   // TODO(benh): Clang requires members to be public in order to take
   // their address which we do in tests (for things like
   // FUTURE_DISPATCH).
@@ -642,10 +650,6 @@ private:
   // the master.
   process::Timer pingTimer;
 
-  // Flag to indicate if recovery, including reconciling (i.e., reconnect/kill)
-  // with executors is finished.
-  process::Promise<Nothing> recovered;
-
   // Root meta directory containing checkpointed data.
   const std::string metaDir;