mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chun-Hung Hsiao <chhs...@apache.org>
Subject Re: Review Request 68601: Cleaned up residual CSI endpoint sockets for terminated plugins.
Date Tue, 04 Sep 2018 15:24:19 GMT


> On Sept. 4, 2018, 10:11 a.m., Benjamin Bannier wrote:
> > src/resource_provider/storage/provider.cpp
> > Lines 704 (patched)
> > <https://reviews.apache.org/r/68601/diff/4/?file=2082091#file2082091line704>
> >
> >     Nit: We capture `this` which is worth calling out.
> >     
> >         // ...
> >         .then(defer(self(), [this](
> >         // ...

Dropping this because of consistency in the coding style.

I prefer explicit capture if the lambda *does not/cannot* use `this`, and use `=` otherwise:
By doing explicit captures for lambda that does not use `this`, if someone want to capture
`this` in the future, they will be forced to examine if it is safe.


> On Sept. 4, 2018, 10:11 a.m., Benjamin Bannier wrote:
> > src/resource_provider/storage/provider.cpp
> > Lines 779-781 (patched)
> > <https://reviews.apache.org/r/68601/diff/4/?file=2082091#file2082091line779>
> >
> >     Since `killContainer` and `waitContainer` already handle not running containers,
we should simplify this flow by calling them unconditionally.
> >     
> >         Future<Nothing> cleanup = killContainer(containerId)
> >            .then(defer(self(), &Self::waitContainer, containerId)
> >            .then(defer(self(), [this, containerId, path]() -> Future<Nothing>
{
> >            // ...
> 
> Benjamin Bannier wrote:
>     This does not work as the container ID might have been reduced in the meantime. Dropping.

I added some comments to explain why we don't unconditionally kill the container.


- Chun-Hung


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


On Sept. 4, 2018, 3:16 p.m., Chun-Hung Hsiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68601/
> -----------------------------------------------------------
> 
> (Updated Sept. 4, 2018, 3:16 p.m.)
> 
> 
> Review request for mesos, Benjamin Bannier and Jie Yu.
> 
> 
> Bugs: MESOS-8429
>     https://issues.apache.org/jira/browse/MESOS-8429
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> If a CSI plugin is crashed during agent failover, the residual socket
> file would exist during SLRP recovery, which may in turn make the plugin
> fail to restart. This patch cleans up the residual socket files to avoid
> such failures.
> 
> 
> Diffs
> -----
> 
>   src/resource_provider/storage/provider.cpp ab1467c22ded269cb42fc52d3f00fb936fc42c7f

> 
> 
> Diff: https://reviews.apache.org/r/68601/diff/5/
> 
> 
> Testing
> -------
> 
> sudo make check
> 
> 
> Thanks,
> 
> Chun-Hung Hsiao
> 
>


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