You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2017/10/30 15:18:56 UTC

[10/15] mesos git commit: Removed TODOs from storage operation 'apply' handlers.

Removed TODOs from storage operation 'apply' handlers.

These operations don't alter the offered resources immediately.
Only after operation feedback has been received, resources might
be altered. But this will be handled in a different code path.

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


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

Branch: refs/heads/master
Commit: 2a620fd1296620004ed24e260e5a8993c9652427
Parents: 6c8ae68
Author: Jan Schlicht <ja...@mesosphere.io>
Authored: Tue Oct 17 15:19:29 2017 +0200
Committer: Jie Yu <yu...@gmail.com>
Committed: Mon Oct 30 16:18:31 2017 +0100

----------------------------------------------------------------------
 src/common/resources.cpp | 20 ++++++++++++--------
 src/v1/resources.cpp     | 20 ++++++++++++--------
 2 files changed, 24 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/2a620fd1/src/common/resources.cpp
----------------------------------------------------------------------
diff --git a/src/common/resources.cpp b/src/common/resources.cpp
index e25f830..791b9cf 100644
--- a/src/common/resources.cpp
+++ b/src/common/resources.cpp
@@ -1784,21 +1784,25 @@ Try<Resources> Resources::apply(const Offer::Operation& operation) const
       break;
     }
 
-    case Offer::Operation::CREATE_VOLUME:
-      // TODO(nfnt): Implement this.
+    case Offer::Operation::CREATE_VOLUME: {
+      // CreateVolume operation does not alter the offered resources.
       break;
+    }
 
-    case Offer::Operation::DESTROY_VOLUME:
-      // TODO(nfnt): Implement this.
+    case Offer::Operation::DESTROY_VOLUME: {
+      // DestroyVolume operation does not alter the offered resources.
       break;
+    }
 
-    case Offer::Operation::CREATE_BLOCK:
-      // TODO(nfnt): Implement this.
+    case Offer::Operation::CREATE_BLOCK: {
+      // CreateBlock operation does not alter the offered resources.
       break;
+    }
 
-    case Offer::Operation::DESTROY_BLOCK:
-      // TODO(nfnt): Implement this.
+    case Offer::Operation::DESTROY_BLOCK: {
+      // DestroyBlock operation does not alter the offered resources.
       break;
+    }
 
     case Offer::Operation::UNKNOWN:
       return Error("Unknown offer operation");

http://git-wip-us.apache.org/repos/asf/mesos/blob/2a620fd1/src/v1/resources.cpp
----------------------------------------------------------------------
diff --git a/src/v1/resources.cpp b/src/v1/resources.cpp
index 405bd9b..3ef4941 100644
--- a/src/v1/resources.cpp
+++ b/src/v1/resources.cpp
@@ -1813,21 +1813,25 @@ Try<Resources> Resources::apply(const Offer::Operation& operation) const
       break;
     }
 
-    case Offer::Operation::CREATE_VOLUME:
-      // TODO(nfnt): Implement this.
+    case Offer::Operation::CREATE_VOLUME: {
+      // CreateVolume operation does not alter the offered resources.
       break;
+    }
 
-    case Offer::Operation::DESTROY_VOLUME:
-      // TODO(nfnt): Implement this.
+    case Offer::Operation::DESTROY_VOLUME: {
+      // DestroyVolume operation does not alter the offered resources.
       break;
+    }
 
-    case Offer::Operation::CREATE_BLOCK:
-      // TODO(nfnt): Implement this.
+    case Offer::Operation::CREATE_BLOCK: {
+      // CreateBlock operation does not alter the offered resources.
       break;
+    }
 
-    case Offer::Operation::DESTROY_BLOCK:
-      // TODO(nfnt): Implement this.
+    case Offer::Operation::DESTROY_BLOCK: {
+      // DestroyBlock operation does not alter the offered resources.
       break;
+    }
 
     case Offer::Operation::UNKNOWN:
       return Error("Unknown offer operation");