You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by GitBox <gi...@apache.org> on 2021/10/17 00:42:22 UTC

[GitHub] [mesos] xiao66xiang commented on a change in pull request #410: Fix Timeout overflow issue caused by negative duration

xiao66xiang commented on a change in pull request #410:
URL: https://github.com/apache/mesos/pull/410#discussion_r730161866



##########
File path: 3rdparty/libprocess/include/process/timeout.hpp
##########
@@ -34,10 +34,20 @@ class Timeout
   // from now.
   static Timeout in(const Duration& duration)
   {
+    Time now = Clock::now();
+    if (duration < Duration::zero()) {

Review comment:
       In `gc.cpp`, it will order the files based on Timeout, so the oldest file gets deleted first. The constructor of the `Timeout` class can also take time in the past. But it's also fine if we just return `now`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@mesos.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org