----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/42559/#review115537 -----------------------------------------------------------
src/master/allocator/mesos/hierarchical.cpp (line 1310) <https://reviews.apache.org/r/42559/#comment176515> The `resource` will include some `reserved` resources, here even if you call `resource.mutable_revocable();`, the `reserved` resources will still be considered as `reserved`. Take a look at isReserved() bool Resources::isReserved( const Resource& resource, const Option<string>& role) { if (role.isSome()) { return !isUnreserved(resource) && role.get() == resource.role(); } else { return !isUnreserved(resource); } } bool Resources::isUnreserved(const Resource& resource) { return resource.role() == "*" && !resource.has_reservation(); } For a resources such as `cpus(r1):100`, after call `resource.mutable_revocable();`, it will be `cpus(r1){REV}:100`, and the helper function `isReserved(resources, role)` still treate this as `reserved` resources but not `revocable` resources. This has highly dependency and interaction with MESOS-1607,the optimisitic offer phase 1, in phase 1, we are planning to treate the `reserved but not used` as `allocation slack`, it is not right if you simply translating all `resources` to `revocable`, you may want at least filter out the `reserved` resources when translating to `revocalbe` resources. I would suggest you also invite bmahler as review as he may be the shephard for MESOS-1607 - Guangya Liu On 一月 20, 2016, 5:01 p.m., Alexander Rukletsov wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/42559/ > ----------------------------------------------------------- > > (Updated 一月 20, 2016, 5:01 p.m.) > > > Review request for mesos, Bernd Mathiske, Joris Van Remoortere, Joseph Wu, > and Qian Zhang. > > > Bugs: MESOS-4441 > https://issues.apache.org/jira/browse/MESOS-4441 > > > Repository: mesos > > > Description > ------- > > See summary. > > > Diffs > ----- > > docs/quota.md 1a6d2f07fb74d168a7eb30764ab9ff80cea5e3b6 > src/master/allocator/mesos/hierarchical.cpp > e32ee4aa3ed9793bb5a99233e699e5cc2bdd796b > src/tests/hierarchical_allocator_tests.cpp > 953712149bd951789beb29c72779c4ac65aa48dc > > Diff: https://reviews.apache.org/r/42559/diff/ > > > Testing > ------- > > On Mac OS 10.10.4: > > `GTEST_FILTER="HierarchicalAllocatorTest.*" ./bin/mesos-tests.sh > --gtest_repeat=100 --gtest_break_on_failure --gtest_shuffle` > `make check` > > Updated `HierarchicalAllocatorTest.DRFWithQuota` succeeds with the change and > fails without. > > > Thanks, > > Alexander Rukletsov > >
