mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Peach <jpe...@apache.org>
Subject Re: Review Request 58305: Add some parameter validation to ReRegisterSlaveMessage.
Date Wed, 19 Apr 2017 17:25:40 GMT


> On April 17, 2017, 7:59 p.m., Neil Conway wrote:
> > src/master/validation.cpp
> > Lines 259 (patched)
> > <https://reviews.apache.org/r/58305/diff/4/?file=1693208#file1693208line259>
> >
> >     Personally, I'd find it more readable to say:
> >     
> >     ```
> >     if (frameworkIDs.contains(framework.id()) {
> >       return Error(...);
> >     }
> >     
> >     frameworkIDs.insert(framework.id());
> >     ```

Since this validation will run a lot on a master failover, I thought is was worth optimization.


- James


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


On April 18, 2017, 10:22 p.m., James Peach wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58305/
> -----------------------------------------------------------
> 
> (Updated April 18, 2017, 10:22 p.m.)
> 
> 
> Review request for mesos, Mesos Reviewbot and Neil Conway.
> 
> 
> Bugs: MESOS-7372
>     https://issues.apache.org/jira/browse/MESOS-7372
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The ReRegisterSlaveMessage message sends a number of fields which have
> internal consistency requirements. Add some simple validation checks
> to ensure that we have a minimally consistent re-registration request
> before proceeding.
> 
> 
> Diffs
> -----
> 
>   src/master/master.cpp 0f4c64c6b102ef201779a331c96b5d78a98281ad 
>   src/master/validation.hpp d96287de73ddb30ae2ed841c1b910b0ac6cfa74e 
>   src/master/validation.cpp 3f70875484bbd856ac79a7d6070ac313d69782fa 
> 
> 
> Diff: https://reviews.apache.org/r/58305/diff/5/
> 
> 
> Testing
> -------
> 
> Make check (Fedora 25). Internal fuzzing.
> 
> 
> Thanks,
> 
> James Peach
> 
>


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