You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Benjamin Mahler <bm...@apache.org> on 2018/09/18 19:58:13 UTC
Review Request 68732: Cached weights in the sorters nodes.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68732/
-----------------------------------------------------------
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
Re: Review Request 68732: Cached weights in the sorters nodes.
Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68732/#review208727
-----------------------------------------------------------
FAIL: Failed to apply the current review.
Failed command: `python.exe .\support\apply-reviews.py -n -r 68732`
All the build artifacts available at: http://dcos-win.westus2.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2352/mesos-review-68732
Relevant logs:
- [apply-review-68732.log](http://dcos-win.westus2.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2352/mesos-review-68732/logs/apply-review-68732.log):
```
error: patch failed: src/master/allocator/sorter/random/sorter.hpp:117
error: src/master/allocator/sorter/random/sorter.hpp: patch does not apply
error: patch failed: src/master/allocator/sorter/random/sorter.cpp:540
error: src/master/allocator/sorter/random/sorter.cpp: patch does not apply
```
- Mesos Reviewbot Windows
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
>
>
Re: Review Request 68732: Cached weights in the sorters nodes.
Posted by Meng Zhu <mz...@mesosphere.io>.
-----------------------------------------------------------
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
>
>
Re: Review Request 68732: Cached weights in the sorters nodes.
Posted by Meng Zhu <mz...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68732/#review209003
-----------------------------------------------------------
Ship it!
Ship It!
- Meng Zhu
On Sept. 24, 2018, 5:22 p.m., Benjamin Mahler wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68732/
> -----------------------------------------------------------
>
> (Updated Sept. 24, 2018, 5:22 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 2957a2ea4e6d8fe9cc661be1a42ab3e17a338769
> src/master/allocator/sorter/drf/sorter.cpp a45f66ff0d77becb6f96f7ff4c288e4ab218e070
> src/master/allocator/sorter/random/sorter.hpp 825c158322885d52803994c0a827a67aedd609f4
> src/master/allocator/sorter/random/sorter.cpp fc47756927a6e45183713955e819e0640318f838
>
>
> Diff: https://reviews.apache.org/r/68732/diff/3/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Benjamin Mahler
>
>
Re: Review Request 68732: Cached weights in the sorters nodes.
Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68732/#review208981
-----------------------------------------------------------
FAIL: Some of the unit tests failed. Please check the relevant logs.
Reviews applied: `['68732']`
Failed command: `Start-MesosCITesting`
All the build artifacts available at: http://dcos-win.westus2.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2393/mesos-review-68732
Relevant logs:
- [mesos-tests.log](http://dcos-win.westus2.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2393/mesos-review-68732/logs/mesos-tests.log):
```
I0925 02:37:11.954577 824 executor.cpp:909] Sending SIGTERM to process tree at pid 13ate of task adaa82b3-ef7a-451c-82d6-6195d12081d9 of framework 9035e180-fc49-4faa-8613-6561c1f64586-0000 (latest state: TASK_KILLED, status update state: TASK_KILLED)
I0925 02:37:11.951586 12948 slave.cpp:6640] Shutting down executor 'adaa82b3-ef7a-451c-82d6-6195d12081d9' of framework 9035e180-fc49-4faa-8613-6561c1f64586-0000 at executor(1)@192.10.1.5:50600
I0925 02:37:11.953577 12948 slave.cpp:909] Agent terminating
W0925 02:37:11.953577 12948 slave.cpp:3917] Ignoring shutdown framework 9035e180-fc49-4faa-8613-6561c1f64586-0000 because it is terminating
I0925 02:37:11.953577 11348 master.cpp:11030] Removing task adaa82b3-ef7a-451c-82d6-6195d12081d9 with resources cpus(allocated: *):4; mem(allocated: *):2048; disk(allocated: *):1024; ports(allocated: *):[31000-32000] of framework 9035e180-fc49-4faa-8613-6561c1f64586-0000 on agent 9035e180-fc49-4faa-8613-6561c1f64586-S0 at slave(463)@192.10.1.5:65174 (windows-02.aa0q4n2kgcyefckmv0xukjvy4f.xx.internal.cloudapp.net)
I0925 02:37:11.956585 11348 master.cpp:1251] Agent 9035e180-fc49-4faa-8613-6561c1f64586-S0 at slave(463)@192.10.1.5:65174 (windows-02.aa0q4n2kgcyefckmv0xukjvy4f.xx.internal.cloudapp.net) disconnected
I0925 02:37:11.957578 11348 master.cpp:3267] Disconnecting agent 9035e180-fc49-4faa-8613-6561c1f64586-S0 at slave(463)@192.10.1.5:65174 (windows-02.aa0q4n2kgcyefckmv0xukjvy4f.xx.internal.cloudapp.net)
I0925 02:37:11.957578 11348 master.cpp:3286] Deactivating agent 9035e180-fc49-4faa-8613-6561c1f64586-S0 at slave(463)@192.10.1.5:65174 (windows-02.aa0q4n2kgcyefckmv0xukjvy4f.xx.internal.cloudapp.net)
I0925 02:37:11.958577 9012 hierarchical.cpp:359] Removed framework 9035e180-fc49-4faa-8613-6561c1f64586-0000
I0925 02:37:11.958577 14172 containerizer.cpp:2455] Destroying container 80c946a2-997b-4ff5-8de3-c96577b2ea54 in RUNNING state
I0925 02:37:11.958577 14172 containerizer.cpp:3118] Transitioning the state of container 80c946a2-997b-4ff5-8de3-c96577b2ea54 from RUNNING to DESTROYING
I0925 02:37:11.958577 9012 hierarchical.cpp:795] Agent 9035e180-fc49-4faa-8613-[ OK ] IsolationFlag/MemoryIsolatorTest.ROOT_MemUsage/0 (689 ms)
[----------] 1 test from IsolationFlag/MemoryIsolatorTest (713 ms total)
[----------] Global test environment tear-down
[==========] 1052 tests from 103 test cases ran. (501831 ms total)
[ PASSED ] 1051 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] DockerFetcherPluginTest.INTERNET_CURL_InvokeFetchByName
1 FAILED TEST
YOU HAVE 231 DISABLED TESTS
6561c1f64586-S0 deactivated
I0925 02:37:11.959573 14172 launcher.cpp:166] Asked to destroy container 80c946a2-997b-4ff5-8de3-c96577b2ea54
I0925 02:37:11.987630 5136 containerizer.cpp:2957] Container 80c946a2-997b-4ff5-8de3-c96577b2ea54 has exited
I0925 02:37:12.024587 13200 master.cpp:1093] Master terminating
I0925 02:37:12.026571 420 hierarchical.cpp:637] Removed agent 9035e180-fc49-4faa-8613-6561c1f64586-S0
I0925 02:37:12.335326 11836 process.cpp:926] Stopped the socket accept loop
```
- Mesos Reviewbot Windows
On Sept. 25, 2018, 12:22 a.m., Benjamin Mahler wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68732/
> -----------------------------------------------------------
>
> (Updated Sept. 25, 2018, 12:22 a.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 2957a2ea4e6d8fe9cc661be1a42ab3e17a338769
> src/master/allocator/sorter/drf/sorter.cpp a45f66ff0d77becb6f96f7ff4c288e4ab218e070
> src/master/allocator/sorter/random/sorter.hpp 825c158322885d52803994c0a827a67aedd609f4
> src/master/allocator/sorter/random/sorter.cpp fc47756927a6e45183713955e819e0640318f838
>
>
> Diff: https://reviews.apache.org/r/68732/diff/3/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Benjamin Mahler
>
>
Re: Review Request 68732: Cached weights in the sorters nodes.
Posted by Benjamin Mahler <bm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68732/
-----------------------------------------------------------
(Updated Sept. 25, 2018, 12:22 a.m.)
Review request for mesos, Gastón Kleiman and Meng Zhu.
Changes
-------
Updated to handle the virtual leaf case.
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 (updated)
-----
src/master/allocator/sorter/drf/sorter.hpp 2957a2ea4e6d8fe9cc661be1a42ab3e17a338769
src/master/allocator/sorter/drf/sorter.cpp a45f66ff0d77becb6f96f7ff4c288e4ab218e070
src/master/allocator/sorter/random/sorter.hpp 825c158322885d52803994c0a827a67aedd609f4
src/master/allocator/sorter/random/sorter.cpp fc47756927a6e45183713955e819e0640318f838
Diff: https://reviews.apache.org/r/68732/diff/3/
Changes: https://reviews.apache.org/r/68732/diff/2-3/
Testing
-------
make check
Thanks,
Benjamin Mahler
Re: Review Request 68732: Cached weights in the sorters nodes.
Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68732/#review208911
-----------------------------------------------------------
FAIL: Some of the unit tests failed. Please check the relevant logs.
Reviews applied: `['68731', '68732']`
Failed command: `Start-MesosCITesting`
All the build artifacts available at: http://dcos-win.westus2.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2375/mesos-review-68732
Relevant logs:
- [mesos-tests.log](http://dcos-win.westus2.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2375/mesos-review-68732/logs/mesos-tests.log):
```
I0922 00:58:32.127102 9460 executor.cpp:796] Shutting down
I0922 00:58:32.127102 9460 executor.cpp:909] Sending SIGTERM to process tree at pid 798 4ff92165-5200-4d21-b3e7-606f190c07c5-S0 at slave(463)@192.10.1.5:60010 (windows-02.aa0q4n2kgcyefckmv0xukjvy4f.xx.internal.cloudapp.net)
W0922 00:58:32.127102 9120 slave.cpp:3917] Ignoring shutdown framework 4ff92165-5200-4d21-b3e7-606f190c07c5-0000 because it is terminating
I0922 00:58:32.129098 2036 master.cpp:1251] Agent 4ff92165-5200-4d21-b3e7-606f190c07c5-S0 at slave(463)@192.10.1.5:60010 (windows-02.aa0q4n2kgcyefckmv0xukjvy4f.xx.internal.cloudapp.net) disconnected
I0922 00:58:32.130120 2036 master.cpp:3267] Disconnecting agent 4ff92165-5200-4d21-b3e7-606f190c07c5-S0 at slave(463)@192.10.1.5:60010 (windows-02.aa0q4n2kgcyefckmv0xukjvy4f.xx.internal.cloudapp.net)
I0922 00:58:32.130120 2036 master.cpp:3286] Deactivating agent 4ff92165-5200-4d21-b3e7-606f190c07c5-S0 at slave(463)@192.10.1.5:60010 (windows-02.aa0q4n2kgcyefckmv0xukjvy4f.xx.internal.cloudapp.net)
I0922 00:58:32.130120 6860 hierarchical.cpp:359] Removed framework 4ff92165-5200-4d21-b3e7-606f190c07c5-0000
I0922 00:58:32.130120 6860 hierarch[ OK ] IsolationFlag/MemoryIsolatorTest.ROOT_MemUsage/0 (586 ms)
[----------] 1 test from IsolationFlag/MemoryIsolatorTest (609 ms total)
[----------] Global test environment tear-down
[==========] 1052 tests from 103 test cases ran. (495994 ms total)
[ PASSED ] 1049 tests.
[ FAILED ] 3 tests, listed below:
[ FAILED ] HierarchicalAllocatorTest.UpdateWeight
[ FAILED ] DRFSorterTest.UpdateWeight
[ FAILED ] DRFSorterTest.AddChildToLeaf
3 FAILED TESTS
YOU HAVE 231 DISABLED TESTS
ical.cpp:795] Agent 4ff92165-5200-4d21-b3e7-606f190c07c5-S0 deactivated
I0922 00:58:32.132110 6860 containerizer.cpp:2455] Destroying container c385de0e-b282-4f21-af81-4102668b7aec in RUNNING state
I0922 00:58:32.132110 6860 containerizer.cpp:3118] Transitioning the state of container c385de0e-b282-4f21-af81-4102668b7aec from RUNNING to DESTROYING
I0922 00:58:32.132110 6860 launcher.cpp:166] Asked to destroy container c385de0e-b282-4f21-af81-4102668b7aec
I0922 00:58:32.156147 552 containerizer.cpp:2957] Container c385de0e-b282-4f21-af81-4102668b7aec has exited
I0922 00:58:32.188154 552 master.cpp:1093] Master terminating
I0922 00:58:32.189256 9120 hierarchical.cpp:637] Removed agent 4ff92165-5200-4d21-b3e7-606f190c07c5-S0
I0922 00:58:32.454150 7296 process.cpp:926] Stopped the socket accept loop
```
- Mesos Reviewbot Windows
On Sept. 21, 2018, 11:24 p.m., Benjamin Mahler wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68732/
> -----------------------------------------------------------
>
> (Updated Sept. 21, 2018, 11:24 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 71352c848e812b7c499dfbf0f09dc86fac3ee8e1
> src/master/allocator/sorter/drf/sorter.cpp a45f66ff0d77becb6f96f7ff4c288e4ab218e070
> src/master/allocator/sorter/random/sorter.hpp 6bfeda0f0d02b4738a6d46a7798b1bf4751f0b38
> src/master/allocator/sorter/random/sorter.cpp fc47756927a6e45183713955e819e0640318f838
>
>
> Diff: https://reviews.apache.org/r/68732/diff/2/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Benjamin Mahler
>
>
Re: Review Request 68732: Cached weights in the sorters nodes.
Posted by Benjamin Mahler <bm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68732/
-----------------------------------------------------------
(Updated Sept. 21, 2018, 11:24 p.m.)
Review request for mesos, Gastón Kleiman and Meng Zhu.
Changes
-------
Updated per feedback.
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 (updated)
-----
src/master/allocator/sorter/drf/sorter.hpp 71352c848e812b7c499dfbf0f09dc86fac3ee8e1
src/master/allocator/sorter/drf/sorter.cpp a45f66ff0d77becb6f96f7ff4c288e4ab218e070
src/master/allocator/sorter/random/sorter.hpp 6bfeda0f0d02b4738a6d46a7798b1bf4751f0b38
src/master/allocator/sorter/random/sorter.cpp fc47756927a6e45183713955e819e0640318f838
Diff: https://reviews.apache.org/r/68732/diff/2/
Changes: https://reviews.apache.org/r/68732/diff/1-2/
Testing
-------
make check
Thanks,
Benjamin Mahler
Re: Review Request 68732: Cached weights in the sorters nodes.
Posted by Benjamin Mahler <bm...@apache.org>.
> 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
>
>
Re: Review Request 68732: Cached weights in the sorters nodes.
Posted by Meng Zhu <mz...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68732/#review208768
-----------------------------------------------------------
src/master/allocator/sorter/drf/sorter.hpp
Lines 249 (patched)
<https://reviews.apache.org/r/68732/#comment292932>
This is a good place to use `mutable` to express logical constness. Then we can mark the corresponding member functions `const`.
src/master/allocator/sorter/drf/sorter.cpp
Line 311 (original), 311 (patched)
<https://reviews.apache.org/r/68732/#comment292937>
Not yours, but we should probably use read-only access here.
src/master/allocator/sorter/drf/sorter.cpp
Lines 316 (patched)
<https://reviews.apache.org/r/68732/#comment292936>
Can't we just use the client map?
CHECK_NOTNONE(clients.get(path))->weight = weight;
src/master/allocator/sorter/drf/sorter.cpp
Line 596 (original), 627 (patched)
<https://reviews.apache.org/r/68732/#comment292933>
make it `const` as mentioned
src/master/allocator/sorter/drf/sorter.cpp
Line 626 (original), 657 (patched)
<https://reviews.apache.org/r/68732/#comment292934>
ditto `const`
src/master/allocator/sorter/random/sorter.hpp
Lines 241 (patched)
<https://reviews.apache.org/r/68732/#comment292935>
ditto `mutable` and make member functions `const` and other issues mentioned above.
- 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
>
>