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 2015/03/27 01:28:14 UTC

mesos git commit: Fixed an incorrect metric for slave removals.

Repository: mesos
Updated Branches:
  refs/heads/master 72548a736 -> b9a8dcac7


Fixed an incorrect metric for slave removals.

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


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

Branch: refs/heads/master
Commit: b9a8dcac78a66bb880955a47f164850eaf7aa4cc
Parents: 72548a7
Author: Benjamin Mahler <be...@gmail.com>
Authored: Thu Mar 26 16:39:32 2015 -0700
Committer: Benjamin Mahler <be...@gmail.com>
Committed: Thu Mar 26 16:40:02 2015 -0700

----------------------------------------------------------------------
 src/master/master.cpp | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/b9a8dcac/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index dccd7c6..ffccc12 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -1233,6 +1233,11 @@ void Master::recoveredSlavesTimeout(const Registry& registry)
   // Remove the slaves in a rate limited manner, similar to how the
   // SlaveObserver removes slaves.
   foreach (const Registry::Slave& slave, registry.slaves().slaves()) {
+    // The slave is removed from 'recovered' when it re-registers.
+    if (!slaves.recovered.contains(slave.info().id())) {
+      continue;
+    }
+
     Future<Nothing> acquire = Nothing();
 
     if (slaves.limiter.isSome()) {