> On Aug. 19, 2013, 3:49 p.m., Benjamin Hindman wrote: > > src/master/hierarchical_allocator_process.hpp, lines 471-472 > > <https://reviews.apache.org/r/13620/diff/1/?file=342088#file342088line471> > > > > What's the difference between these two? Or why isn't 'unallocated' > > also "removing" the resources?
Sorter::unallocated tells the sorter that those resources are no longer allocated to that framework. Sorter::remove tells the allocator that those resources are no longer in the total pool the allocated resources are coming out of. In the case of the role level sorter, Sorter::remove is only called when a slave is removed, but for the framework level sorters, we call Sorter::remove each time a framework is deallocated from, so that the framework's share is calculated as a portion of the total resources allocated to all frameworks in that role, rather than as a portion of the total cluster resources. - Thomas ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13620/#review25303 ----------------------------------------------------------- On Aug. 16, 2013, 5:30 p.m., Thomas Marshall wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/13620/ > ----------------------------------------------------------- > > (Updated Aug. 16, 2013, 5:30 p.m.) > > > Review request for mesos, Benjamin Hindman and Vinod Kone. > > > Bugs: MESOS-621 > https://issues.apache.org/jira/browse/MESOS-621 > > > Repository: mesos-git > > > Description > ------- > > Previously, when a slave or framework was removed the allocator didn't > recover the associated resources, instead relying on the master calling > Allocator::resourcesRecovered for all resources allocated. This was difficult > to reason about and meant that the allocator's state was sometimes > inconsistent with the reality of the cluster (for example, a framework could > have resources allocated to it on a slave that had been removed), so this > patch fixes this. > > This also solves a problem with the upcoming implementation of revocation > where resources were recovered from a removed framework and the allocator > didn't know what that framework's role is because it had been removed. > > > Diffs > ----- > > src/master/hierarchical_allocator_process.hpp 183b205 > src/master/master.cpp d53b8bb > > Diff: https://reviews.apache.org/r/13620/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Thomas Marshall > >
