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




src/docker/docker.cpp
Lines 1287 (patched)
<https://reviews.apache.org/r/65683/#comment278346>

    Derp. This will clearly not work because the `s` which we capture into the 
`onDiscard` callback is a different copy than the `s` which we reassign in 
`_inspect()`.
    
    It probably makes sense to use a `shared_ptr` here, and do an 
`atomic_exchange` to reassign. This will maintain thread safety, and keep the 
object alive until the `onDiscard` callback has executed.


- Greg Mann


On Feb. 23, 2018, 11:07 p.m., Greg Mann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65683/
> -----------------------------------------------------------
> 
> (Updated Feb. 23, 2018, 11:07 p.m.)
> 
> 
> Review request for mesos, Andrei Budnik, Gilbert Song, Michael Park, and 
> Vinod Kone.
> 
> 
> Bugs: MESOS-8575
>     https://issues.apache.org/jira/browse/MESOS-8575
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Updated discard handling of the Docker 'inspect' call.
> 
> 
> Diffs
> -----
> 
>   src/docker/docker.hpp d9e71f8841a868082170d28fc4f3d495e2eb1e61 
>   src/docker/docker.cpp 3df370e988fce12d323ff6b441da15dab27bdd28 
> 
> 
> Diff: https://reviews.apache.org/r/65683/diff/6/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Greg Mann
> 
>

Reply via email to