> On Sept. 19, 2018, 5:54 p.m., Meng Zhu wrote:
> > src/master/allocator/sorter/drf/sorter.cpp
> > Lines 316 (patched)
> > <https://reviews.apache.org/r/68732/diff/1/?file=2090166#file2090166line316>
> >
> >     Can't we just use the client map?
> >     
> >     CHECK_NOTNONE(clients.get(path))->weight = weight;

Guilty.. much cleaner, thanks!


- Benjamin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68732/#review208768
-----------------------------------------------------------


On Sept. 18, 2018, 7:58 p.m., Benjamin Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68732/
> -----------------------------------------------------------
> 
> (Updated Sept. 18, 2018, 7:58 p.m.)
> 
> 
> Review request for mesos, Gastón Kleiman and Meng Zhu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This avoids making excessive map lookups each time we calculate the
> share for a node in the tree. Now, when the weight is needed, the
> value is cached. If the weight gets updated, we update the cached
> value. This approach proved cleaner than trying to ensure freshly
> constructed nodes have the right weight.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/sorter/drf/sorter.hpp 
> 5a4fa5e2dca61168923261230b1f5c245354cbb7 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 07e5482f37da8585d0313e9f70bd8105efa19533 
>   src/master/allocator/sorter/random/sorter.hpp 
> 7f6c0de70e3ae03d7362fb9e140b93435e530499 
>   src/master/allocator/sorter/random/sorter.cpp 
> d17f8afa96b66e63f56ccaa472ad398f8f517b65 
> 
> 
> Diff: https://reviews.apache.org/r/68732/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Benjamin Mahler
> 
>

Reply via email to