mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jie Yu <yujie....@gmail.com>
Subject Re: Review Request 50199: Refactored fetcher cache directory creation.
Date Wed, 20 Jul 2016 22:26:37 GMT

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


Fix it, then Ship it!





src/launcher/fetcher.cpp (lines 506 - 508)
<https://reviews.apache.org/r/50199/#comment208653>

    Can we instead use:
    ```
    CHECK_SOME(createCacheDirectory(fetcherInfo.get()))
      << "...";
    ```



src/launcher/fetcher.cpp (line 430)
<https://reviews.apache.org/r/50199/#comment208696>

    for such case, we usually do the following to avoid more level of nesting:
    ```
    if (!fetcherInfo.has_cache_directory()) {
      return Nothing();
    }
    
    foreach (...)
    ```



src/launcher/fetcher.cpp (line 436)
<https://reviews.apache.org/r/50199/#comment208695>

    s/result/mkdir/



src/launcher/fetcher.cpp (lines 444 - 445)
<https://reviews.apache.org/r/50199/#comment208694>

    I'd prefer
    ```
    Try<Nothing> chown = os:chown(
        fetcherInfo.user(),
        fetcherInfo.cache_directory(),
        false);
        
    if (chown.isError()) {
      return chown;
    }
    ```


- Jie Yu


On July 20, 2016, 10:07 p.m., Greg Mann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50199/
> -----------------------------------------------------------
> 
> (Updated July 20, 2016, 10:07 p.m.)
> 
> 
> Review request for mesos, Gilbert Song, Jie Yu, and Joerg Schad.
> 
> 
> Bugs: MESOS-5845
>     https://issues.apache.org/jira/browse/MESOS-5845
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The fetcher's launcher creates the fetcher cache
> directory for each user immediately before an artifact
> is fetched. In order to allow this directory to be
> created by a different user than the user doing the
> fetching, this patch factors out this directory
> creation and places it before all fetches occur.
> 
> 
> Diffs
> -----
> 
>   src/launcher/fetcher.cpp 0539b0182bd4a7178f103dddd1ab4fee8fc79eda 
> 
> Diff: https://reviews.apache.org/r/50199/diff/
> 
> 
> Testing
> -------
> 
> `sudo make check` on both OSX and CentOS 7 was done at the end of this patch chain.
> 
> 
> Thanks,
> 
> Greg Mann
> 
>


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