> On July 5, 2018, 2:22 p.m., Benjamin Mahler wrote: > > src/master/allocator/mesos/hierarchical.cpp > > Lines 2586-2588 (patched) > > <https://reviews.apache.org/r/67444/diff/1/?file=2046973#file2046973line2654> > > > > It's pretty hard to reason from here about whether this is correct. For > > example, how do we know that these quantities were not already tracked > > because they were allocated prior to becoming reserved? If that invariant > > doesn't hold we'll double count?
Thanks for catching this! The invariant should be: (1) when tracking reservation, only track unallocated reservations (2) when track allocation, only track unreserved allocations (2) is already being done. (1) is hard to do given the current abstraction, we will need more than raw "reservations". Will need more refactoring on the Slave struct in the allocator to make this work and readable. Will come back to this later. In addition, this reminds me that we do not have tests for the above scenario yet. Will add some. - Meng ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/67444/#review205762 ----------------------------------------------------------- On June 28, 2018, 1:55 p.m., Meng Zhu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/67444/ > ----------------------------------------------------------- > > (Updated June 28, 2018, 1:55 p.m.) > > > Review request for mesos and Benjamin Mahler. > > > Bugs: MESOS-8802 > https://issues.apache.org/jira/browse/MESOS-8802 > > > Repository: mesos > > > Description > ------- > > The allocator needs to keep track of role consumed quota > to maintain quota headroom. Currently this info is > constructed on the fly prior to each allocation cycle. > > This patch lets the allocator buildup and persist this info > across allocation cycles to improve performance and reduce > code complexity. > > > Diffs > ----- > > src/master/allocator/mesos/hierarchical.hpp > 0f6c0e96a105c64465d3f5db4ff663d8fdfe7e26 > src/master/allocator/mesos/hierarchical.cpp > cbdfb2ba9c25755ac631557e0e7dbd721f861a4d > > > Diff: https://reviews.apache.org/r/67444/diff/1/ > > > Testing > ------- > > make check > > > Thanks, > > Meng Zhu > >
