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


Fix it, then Ship it!




LGTM, barring my nits about lambda indentation.


src/files/files.cpp (lines 347 - 350)
<https://reviews.apache.org/r/48566/#comment202270>

    I prefer wrapping before the `[]`
    ```
      return authorize(requestedPath, principal)
        .then(defer(self(),
            [this, path, jsonp](bool authorized) -> Future<Response> {
          if (authorized) {
    ```



src/files/files.cpp (lines 488 - 491)
<https://reviews.apache.org/r/48566/#comment202271>

    Wrap before `[]()` (inputs) and `->` (outputs):
    ```
      return authorize(requestedPath, principal)
        .then(defer(self(),
            [this, offset, length, path, jsonp](bool authorized)
              -> Future<Response> {
          if (authorized) {
    ```



src/files/files.cpp (lines 635 - 638)
<https://reviews.apache.org/r/48566/#comment202272>

    ```
      return authorize(requestedPath, principal)
        .then(defer(self(),
            [this, path](bool authorized) -> Future<Response> {
          if (authorized) {
    ```


- Adam B


On June 10, 2016, 9:19 p.m., Joerg Schad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48566/
> -----------------------------------------------------------
> 
> (Updated June 10, 2016, 9:19 p.m.)
> 
> 
> Review request for mesos, Adam B and Alexander Rojas.
> 
> 
> Bugs: MESOS-5587
>     https://issues.apache.org/jira/browse/MESOS-5587
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Previously the continuation followed via `.then([=]`,
> which potentially executes the continuation on a different
> process. This patch fixes this behavior (it should
> run on the same process) and avoids potential race 
> conditions if the file logic is handled by different 
> processes.
> 
> 
> Diffs
> -----
> 
>   src/files/files.cpp 55c310af149cb03abfa1ffbb6477dc1ac5dc14be 
> 
> Diff: https://reviews.apache.org/r/48566/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Joerg Schad
> 
>

Reply via email to