You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by al...@apache.org on 2017/11/14 08:22:49 UTC

mesos git commit: Revert "Handled the resource conversion for new operations in master."

Repository: mesos
Updated Branches:
  refs/heads/master c4c821ca5 -> 1ac932a29


Revert "Handled the resource conversion for new operations in master."

This reverts commit 776bfab969c4df6d1ecea67f8a5aedf1ec3bed83.


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

Branch: refs/heads/master
Commit: 1ac932a29cfbd612f66f3efb20e597227b979d56
Parents: c4c821c
Author: Alexander Rukletsov <al...@apache.org>
Authored: Tue Nov 14 09:16:44 2017 +0100
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Tue Nov 14 09:16:44 2017 +0100

----------------------------------------------------------------------
 src/master/master.cpp | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/1ac932a2/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index 6c452bd..59a5339 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -9748,12 +9748,6 @@ void Master::updateOfferOperation(
   CHECK(operation->has_slave_id())
     << "External resource provider is not supported yet";
 
-  // The slave owns the OfferOperation object and cannot be nullptr.
-  // TODO(jieyu): Revisit this once we introduce support for external
-  // resource provider.
-  Slave* slave = slaves.registered.get(operation->slave_id());
-  CHECK_NOTNULL(slave);
-
   switch (operation->latest_status().state()) {
     // Terminal state, and the conversion is successful.
     case OFFER_OPERATION_FINISHED: {
@@ -9772,8 +9766,6 @@ void Master::updateOfferOperation(
           converted,
           None());
 
-      slave->apply({ResourceConversion(consumed, converted)});
-
       break;
     }
 
@@ -9799,6 +9791,12 @@ void Master::updateOfferOperation(
     }
   }
 
+  // The slave owns the OfferOperation object and cannot be nullptr.
+  // TODO(jieyu): Revisit this once we introduce support for external
+  // resource provider.
+  Slave* slave = slaves.registered.get(operation->slave_id());
+  CHECK_NOTNULL(slave);
+
   slave->recoverResources(operation);
 
   Framework* framework = operation->has_framework_id()