You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2013/03/28 04:10:53 UTC
svn commit: r1461938 - /incubator/mesos/trunk/src/slave/slave.cpp
Author: vinodkone
Date: Thu Mar 28 03:10:53 2013
New Revision: 1461938
URL: http://svn.apache.org/r1461938
Log:
Fixed slave to not garbage collect old slave directories based on
their modification time.
Review: https://reviews.apache.org/r/10162
Modified:
incubator/mesos/trunk/src/slave/slave.cpp
Modified: incubator/mesos/trunk/src/slave/slave.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/slave/slave.cpp?rev=1461938&r1=1461937&r2=1461938&view=diff
==============================================================================
--- incubator/mesos/trunk/src/slave/slave.cpp (original)
+++ incubator/mesos/trunk/src/slave/slave.cpp Thu Mar 28 03:10:53 2013
@@ -509,19 +509,7 @@ void Slave::registered(const SlaveID& sl
// Check that this path is a directory but not our directory!
if (os::isdir(path) && file != info.id().value()) {
-
- Try<long> time = os::mtime(path);
-
- if (time.isSome()) {
- // Schedule the directory to be removed after some remaining
- // delta of the delay and last modification time.
- Seconds delta(flags.gc_delay.secs() - (Clock::now() - time.get()));
- gc.schedule(delta, path);
- } else {
- LOG(WARNING) << "Failed to get the modification time of "
- << path << ": " << time.error();
- gc.schedule(flags.gc_delay, path);
- }
+ gc.schedule(flags.gc_delay, path);
}
}
}