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/04/26 21:03:18 UTC

[3/6] mesos git commit: Cancelled the disk usage collection if no longer needed.

Cancelled the disk usage collection if no longer needed.

We actively cancel the disk usage collection if its result is no
longer needed. This is a performance optimization.

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


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

Branch: refs/heads/master
Commit: c0cfacfb134f74ff35f48e36af2f914e5530057d
Parents: d680ff6
Author: Jie Yu <yu...@gmail.com>
Authored: Fri Apr 21 15:24:10 2017 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Wed Apr 26 13:41:53 2017 -0700

----------------------------------------------------------------------
 src/slave/containerizer/mesos/isolators/posix/disk.cpp | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/c0cfacfb/src/slave/containerizer/mesos/isolators/posix/disk.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/posix/disk.cpp b/src/slave/containerizer/mesos/isolators/posix/disk.cpp
index 127f490..126344e 100644
--- a/src/slave/containerizer/mesos/isolators/posix/disk.cpp
+++ b/src/slave/containerizer/mesos/isolators/posix/disk.cpp
@@ -261,6 +261,8 @@ Future<Nothing> PosixDiskIsolatorProcess::update(
   // Remove paths that we no longer interested in.
   foreach (const string& path, info->paths.keys()) {
     if (!quotas.contains(path)) {
+      // Cancel the usage collection as we are no longer interested.
+      info->paths[path].usage.discard();
       info->paths.erase(path);
     }
   }