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 18:33:44 UTC
svn commit: r1462223 - /incubator/mesos/branches/0.12.x/src/slave/slave.cpp
Author: vinodkone
Date: Thu Mar 28 17:33:44 2013
New Revision: 1462223
URL: http://svn.apache.org/r1462223
Log:
*** MODIFIED FOR 0.12.1 *** Fixed slave to not garbage collect old
slave directories based on their modification time.
Review: https://reviews.apache.org/r/10162
Conflicts:
src/slave/slave.cpp
Modified:
incubator/mesos/branches/0.12.x/src/slave/slave.cpp
Modified: incubator/mesos/branches/0.12.x/src/slave/slave.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/branches/0.12.x/src/slave/slave.cpp?rev=1462223&r1=1462222&r2=1462223&view=diff
==============================================================================
--- incubator/mesos/branches/0.12.x/src/slave/slave.cpp (original)
+++ incubator/mesos/branches/0.12.x/src/slave/slave.cpp Thu Mar 28 17:33:44 2013
@@ -410,19 +410,7 @@ void Slave::registered(const SlaveID& sl
// Check that this path is a directory but not our directory!
if (os::isdir(path) && file != 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);
}
}
}