mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Song <songzihao1...@gmail.com>
Subject Re: Review Request 70890: Added `LauncherTracker` for tracking calls of launcher methods.
Date Thu, 18 Jul 2019 06:27:39 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70890/#review216710
-----------------------------------------------------------




src/slave/containerizer/mesos/launcher_tracker.cpp
Lines 62-80 (patched)
<https://reviews.apache.org/r/70890/#comment303901>

    Could we avoid returning future.get(). It is not a risk here but not very readable.
    
    We could rely on a promise:
    ```
      Promise<pid_t> promise;
      tracker->track(
          promise.future(),
          "launcher::fork",
          COMPONENT_NAME_CONTAINERIZER,
          {{"containerId", stringify(containerId)},
           {"path", path}});
    
      Try<pid_t> forked = launcher->fork(
          containerId,
          path,
          argv,
          containerIO,
          flags,
          environment,
          enterNamespaces,
          cloneNamespaces,
          whitelistFds);
    
      promise.associate(forked);
      return forked;
    ```


- Gilbert Song


On June 19, 2019, 7:49 a.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70890/
> -----------------------------------------------------------
> 
> (Updated June 19, 2019, 7:49 a.m.)
> 
> 
> Review request for mesos, Gilbert Song and Qian Zhang.
> 
> 
> Bugs: MESOS-9840
>     https://issues.apache.org/jira/browse/MESOS-9840
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds a new `LauncherTracker` class that proxies
> calls to the real `Launcher` and keeps track of returned futures
> by employing `PendingFutureTracker` class.
> 
> 
> Diffs
> -----
> 
>   src/CMakeLists.txt eb4e2ac699121ac16e2ac58e4606b26aae906ad8 
>   src/Makefile.am 761dde1d63e0f4f1ac4ab86f129f84f3746d3153 
>   src/slave/containerizer/mesos/launcher_tracker.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/launcher_tracker.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/70890/diff/3/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message