mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Mahler" <benjamin.mah...@gmail.com>
Subject Re: Review Request 35919: Firewall rule's apply method returns an HTTP response instead of an error message.
Date Thu, 02 Jul 2015 19:04:07 GMT


> On July 2, 2015, 1:35 a.m., Ben Mahler wrote:
> > 3rdparty/libprocess/include/process/firewall.hpp, line 59
> > <https://reviews.apache.org/r/35919/diff/4/?file=995819#file995819line59>
> >
> >     Hm.. why is this an Owned<http::Response> as opposed to just an http::Response?
Is there something subtle going on here, or can we just have Option<http::Response>?
> 
> Alexander Rojas wrote:
>     In order to avoid object slicing in the future. While it is true that all the `http::Response`
is a struct and therefore object slicing is not an issue, nothing prevents this from changing
in the future which can lead to weird errors. Personally, I prefer to discourage situations
in which object slicing is a posibility.

Got it, we already have a lot of code relying on `Future<http::Response>`, so I'd suggest
keeping it consistent with that and assuming that slicing is not an issue. Otherwise, people
browsing the code have a hard time figuring out why things were done inconsistently :(

If we introduced some changes that made slicing a problem, we could then do one consistent
sweep to capture it.


- Ben


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


On June 30, 2015, 8:34 a.m., Alexander Rojas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35919/
> -----------------------------------------------------------
> 
> (Updated June 30, 2015, 8:34 a.m.)
> 
> 
> Review request for mesos, Adam B and Till Toenshoff.
> 
> 
> Bugs: MESOS-2877
>     https://issues.apache.org/jira/browse/MESOS-2877
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> see summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/firewall.hpp f71d6541e48e2481c69f401b388977b153503962

>   3rdparty/libprocess/src/process.cpp 52649fb90cdbefb495b68d0beb8c7f7e5ef6888e 
> 
> Diff: https://reviews.apache.org/r/35919/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Alexander Rojas
> 
>


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