> On June 16, 2014, 11:24 p.m., Jie Yu wrote:
> > src/linux/routing/link/link.cpp, line 103
> > <https://reviews.apache.org/r/22593/diff/2/?file=610950#file610950line103>
> >
> >     I think we should return Error if 'test' is an error or none, instead 
> > of moving on silently.
> >     
> >     if (test.isError()) {
> >       return Error(...);
> >     } else if (test.isNone()) {
> >       return Error(...);
> >     } else {
> >       return link;
> >     }
> 
> Chi Zhang wrote:
>     I kept the isError() check but dropped the isNone() check since it's 
> possible for a link to be safely removed after net::links is called, before 
> isNone() is called.
> 
> Jie Yu wrote:
>     Why? What about the operator remove the link using command in between? Do 
> you want to move on silently or returns an error?

I think that scenario is not an error, since we only care about lo in this 
context. say net::links cached some vethx, which gets removed while we are in 
the loop. There is nothing wrong with that for the purpose of locating lo, is 
it?


- Chi


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


On June 16, 2014, 11:56 p.m., Chi Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22593/
> -----------------------------------------------------------
> 
> (Updated June 16, 2014, 11:56 p.m.)
> 
> 
> Review request for mesos, Ian Downes, Jie Yu, Nikita Vetoshkin, Vinod Kone, 
> and Cong Wang.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Routing: added interfaces to find the name of host public and loopback device.
> 
> 
> Diffs
> -----
> 
>   src/linux/routing/link/link.hpp 4264a1e 
>   src/linux/routing/link/link.cpp ebcd119 
>   src/tests/routing_tests.cpp 0e8f61a 
> 
> Diff: https://reviews.apache.org/r/22593/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Chi Zhang
> 
>

Reply via email to