mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From haosdent huang <haosd...@gmail.com>
Subject Re: Review Request 44822: Remove `SlaveState` in `MesosContainerizer` during recover.
Date Mon, 04 Apr 2016 16:48:12 GMT


> On April 3, 2016, 2:08 p.m., Guangya Liu wrote:
> > src/slave/containerizer/mesos/containerizer.cpp, lines 426-429
> > <https://reviews.apache.org/r/44822/diff/4/?file=1323356#file1323356line426>
> >
> >     What about using reference here?
> >     
> >     const ExecutorInfo& executorInfo = recoverable.executor_info();
> >     const ContainerID& containerId = recoverable.container_id();
> >     const FrameworkID& frameworkId = executorInfo.framework_id();
> >     const ExecutorID& executorId = executorInfo.executor_id();
> 
> haosdent huang wrote:
>     I remember mesos style guide didn't alllow const temporary refrence. https://issues.apache.org/jira/browse/MESOS-2629
> 
> Guangya Liu wrote:
>     But I saw that `We allow capturing non-temporaries by *constant reference* when the
intent is to **alias**.`, here most of the variables are some **alias** I think. There are
indeed some places using such style, such as https://github.com/apache/mesos/blob/master/src/slave/containerizer/mesos/isolators/docker/runtime.cpp#L80

I think it may breake this rule
```
// 4: Don't use (since the T that got constructed is a temporary!).
const T& t = T("Hello").member();
```
in style guide. But I would update this because it really din't bring any hurts here if use
`const &`.


- haosdent


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


On April 4, 2016, 4:47 p.m., haosdent huang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44822/
> -----------------------------------------------------------
> 
> (Updated April 4, 2016, 4:47 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ian Downes, Jie Yu, Till Toenshoff, and Timothy
Chen.
> 
> 
> Bugs: MESOS-5085
>     https://issues.apache.org/jira/browse/MESOS-5085
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Remove `SlaveState` in `MesosContainerizer` during recover.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/containerizer.hpp a6e3a8b43fb7591ff6f23b019a062696c8bfb719

>   src/slave/containerizer/mesos/containerizer.cpp a5dd22380066aa85de04d485052084e2629681c0

>   src/tests/containerizer/mesos_containerizer_tests.cpp 09742ff21513dc2570684d384b257868dd57a9ce

> 
> Diff: https://reviews.apache.org/r/44822/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> haosdent huang
> 
>


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