mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <bmah...@apache.org>
Subject Re: Review Request 55910: Prevent unintended mutation in the allocator.
Date Fri, 03 Feb 2017 00:17:35 GMT


> On Jan. 30, 2017, 3:31 p.m., Benjamin Bannier wrote:
> > src/master/allocator/mesos/hierarchical.cpp, line 128
> > <https://reviews.apache.org/r/55910/diff/1/?file=1614081#file1614081line128>
> >
> >     nit: This could be set in the member declaration.

Hm.. is that something we do? Most of our code uses the initializer list AFAICT.


> On Jan. 30, 2017, 3:31 p.m., Benjamin Bannier wrote:
> > src/master/allocator/mesos/hierarchical.cpp, lines 237-241
> > <https://reviews.apache.org/r/55910/diff/1/?file=1614081#file1614081line237>
> >
> >     @gyliu: I like introducing `Framework` as a helper doing extraction from a `FrameworkInfo`
(this is expanded on in r/55870).
> >     
> >     @bmahler: `insert` also takes an `initializer_list`, i.e.,
> >     
> >         frameworks.insert({frameworkId, Framework(frameworkInfo)});
> >         
> >     Otherwise please include `<utility>`.

Will use an initializer list, thanks!


- Benjamin


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


On Jan. 25, 2017, 2:40 a.m., Benjamin Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55910/
> -----------------------------------------------------------
> 
> (Updated Jan. 25, 2017, 2:40 a.m.)
> 
> 
> Review request for mesos and Michael Park.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Currently, a lof of code in the allocator makes use of the `[]`
> operator to access the agents, frameworks and sorters, which
> can lead to subtle bugs where insertion was unintended.
> 
> With this change, a few const functions can be marked as such.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.hpp 9b66c23f26b37c02ed850c06c4518ea99078b02d

>   src/master/allocator/mesos/hierarchical.cpp c2211be7458755aeb91ef078e4bfe92ac474044a

> 
> Diff: https://reviews.apache.org/r/55910/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Benjamin Mahler
> 
>


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