----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/53096/#review156326 -----------------------------------------------------------
src/master/allocator/mesos/hierarchical.cpp (lines 752 - 755) <https://reviews.apache.org/r/53096/#comment226568> This seems the wrong place to do it, multiple copies of the same shared resources are added to the allocation of the role (in roleSorter and quotaRoleSorter) from multiple places: - updateAllocation - addFramework - addSlave - allocate If the rule is to not have more than one copy the shared resources to roleSorter and quotaRoleSorter, they should be invariants, i.e., we should prevent them from being added instead of deduping them here. Let's chat about the design. src/master/allocator/mesos/hierarchical.cpp (line 757) <https://reviews.apache.org/r/53096/#comment226539> So if `operation` contians multiple copies, the result will end up having multiple copies right? - Jiang Yan Xu On Nov. 17, 2016, 9:14 p.m., Anindya Sinha wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/53096/ > ----------------------------------------------------------- > > (Updated Nov. 17, 2016, 9:14 p.m.) > > > Review request for mesos and Jiang Yan Xu. > > > Bugs: MESOS-6444 > https://issues.apache.org/jira/browse/MESOS-6444 > > > Repository: mesos > > > Description > ------- > > We maintain a single copy of shared resource in the role and quota > sorter's total resources. So, when we update these resources, we ensure > that we only count a single copy even though the framework sorter > may be returned multiple copies of a shared resource. > > > Diffs > ----- > > src/master/allocator/mesos/hierarchical.cpp > c8f9492ee1b69e125a1e841116d22a578a9b524e > src/tests/persistent_volume_tests.cpp > 8651b2c5455089041f16d091c90a7e0d948191b8 > > Diff: https://reviews.apache.org/r/53096/diff/ > > > Testing > ------- > > Tests passed. > > > Thanks, > > Anindya Sinha > >