-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70429/
-----------------------------------------------------------
(Updated April 24, 2019, 3:34 p.m.)
Review request for mesos and Benjamin Mahler.
Changes
-------
Refactored the patch.
Bugs: MESOS-9733
https://issues.apache.org/jira/browse/MESOS-9733
Repository: mesos
Description
-------
Currently, in the presence of hierarchical roles, the
random sorter shuffles roles level by level and then pick
the active leave nodes using DFS. This could generate
non-uniform random result since active leaves in a subtree
are always picked together.
This patch fixes the issue by first calculating the relative
weights of each active leaf node and shuffle all of them
only once.
Diffs (updated)
-----
src/master/allocator/sorter/random/sorter.hpp
125ce84761e4c930370912151700ddda35d7b6c1
src/master/allocator/sorter/random/sorter.cpp
bbe130dbf3b158ea14f9572bc5d14200fcd85127
src/tests/sorter_tests.cpp 91bfde01b579a9892215593ab8d8b2d096788278
Diff: https://reviews.apache.org/r/70429/diff/4/
Changes: https://reviews.apache.org/r/70429/diff/3-4/
Testing
-------
make check
Tests for hierarchical roles in subsequent patches
Benchmarking:
Optimized build with
QuotaParam/BENCHMARK_HierarchicalAllocator_WithQuotaParam.LargeAndSmallQuota/2
## Before:
Added 3000 agents in 85.844373ms
Added 3000 frameworks in 19.713969615secs
Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks
Made 3500 allocations in 13.690538305secs
Made 0 allocation in 9.76855825secs
## After:
Added 3000 agents in 93.482508ms
Added 3000 frameworks in 19.193235872secs
Benchmark setup: 3000 agents, 3000 roles, 3000 frameworks
Made 3500 allocations in 13.530734654secs
Made 0 allocation in 10.338803223secs
Thanks,
Meng Zhu