Repository: mesos
Updated Branches:
  refs/heads/master 699a5d226 -> 7e432a930


Disabled checkpointing for OFFER_OPERATION_DROPPED in SLRP.

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


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

Branch: refs/heads/master
Commit: 7e432a9308c5b472aa29168617164a7ee69c02d2
Parents: 1b4f386
Author: Chun-Hung Hsiao <[email protected]>
Authored: Fri Dec 15 09:06:36 2017 -0800
Committer: Jie Yu <[email protected]>
Committed: Fri Dec 15 09:26:55 2017 -0800

----------------------------------------------------------------------
 src/resource_provider/storage/provider.cpp | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/7e432a93/src/resource_provider/storage/provider.cpp
----------------------------------------------------------------------
diff --git a/src/resource_provider/storage/provider.cpp 
b/src/resource_provider/storage/provider.cpp
index 12962d0..158b6b4 100644
--- a/src/resource_provider/storage/provider.cpp
+++ b/src/resource_provider/storage/provider.cpp
@@ -1342,10 +1342,14 @@ void 
StorageLocalResourceProviderProcess::acknowledgeOfferOperation(
                 metaDir, slaveId, info.type(), info.name(), info.id()),
             operationUuid.get());
 
-        Try<Nothing> rmdir = os::rmdir(path);
-        if (rmdir.isError()) {
-          return Failure(
-              "Failed to remove directory '" + path + "': " + rmdir.error());
+        // NOTE: We check if the path exists since we do not checkpoint
+        // some status updates, such as OFFER_OPERATION_DROPPED.
+        if (os::exists(path)) {
+          Try<Nothing> rmdir = os::rmdir(path);
+          if (rmdir.isError()) {
+            return Failure(
+                "Failed to remove directory '" + path + "': " + rmdir.error());
+          }
         }
       }
 
@@ -1393,7 +1397,7 @@ void 
StorageLocalResourceProviderProcess::reconcileOfferOperations(
       fatal();
     };
 
-    statusUpdateManager.update(std::move(update))
+    statusUpdateManager.update(std::move(update), false)
       .onFailed(defer(self(), std::bind(die, lambda::_1)))
       .onDiscarded(defer(self(), std::bind(die, "future discarded")));
   }

Reply via email to