mesos-dev 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 29084: Updated Allocator to allow transforming allocated resources.
Date Wed, 17 Dec 2014 23:33:51 GMT


> On Dec. 16, 2014, 5:25 p.m., Dominic Hamon wrote:
> > src/master/allocator.hpp, line 124
> > <https://reviews.apache.org/r/29084/diff/1/?file=792883#file792883line124>
> >
> >     if this is a Shared, why are you passing by reference? this means the reference
count won't be updated and the lifetime of the Shared may end before this method returns.
> >     
> >     Unless I'm missing something.

bind takes a copy of the arguments in it's result, so it will call this method providing a
const& to the __bound copy__ of the original Shared<T>.

If that wasn't true, the same lifetime issue would apply to all of the const& arguments
in our Process member functions, regardless of whether we're using process::Shared, no?


- Ben


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


On Dec. 17, 2014, 11:24 p.m., Ben Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29084/
> -----------------------------------------------------------
> 
> (Updated Dec. 17, 2014, 11:24 p.m.)
> 
> 
> Review request for mesos and Jie Yu.
> 
> 
> Bugs: MESOS-2099
>     https://issues.apache.org/jira/browse/MESOS-2099
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> The idea here is that we want the framework to be able to transform the resources allocated
to it, and these Transformations need to be reflected in the allocator.
> 
> Note that Transformations should not be updating the quantity, or the static roles of
the resources. I've left this as a TODO and hopefully we can enforce this in the Transformation
abstraction itself.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator.hpp f4068aad42a7df38544718dcd171ff239dc1e39a 
>   src/master/hierarchical_allocator_process.hpp 95fa520a3947474472cd36987c2342e1bfb51cfe

>   src/tests/hierarchical_allocator_tests.cpp 1f627386faab61d500d55b65ff6b95bddc800fd5

>   src/tests/mesos.hpp bb24222c20cb5458b5c627d2001fc3cb1e542cce 
> 
> Diff: https://reviews.apache.org/r/29084/diff/
> 
> 
> Testing
> -------
> 
> Added a test.
> 
> 
> Thanks,
> 
> Ben Mahler
> 
>


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