mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Meng Zhu <m...@mesosphere.io>
Subject Re: Review Request 68732: Cached weights in the sorters nodes.
Date Wed, 19 Sep 2018 23:09:56 GMT

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




src/master/allocator/sorter/drf/sorter.cpp
Line 311 (original), 311 (patched)
<https://reviews.apache.org/r/68732/#comment292964>

    Also, I wonder can we get rid of the weights map and just store the weights in the Node?


- Meng Zhu


On Sept. 18, 2018, 12: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, 12: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
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message