mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <bmah...@apache.org>
Subject Re: Review Request 48579: Reset "dirty" to false in sort().
Date Tue, 21 Jun 2016 21:15:21 GMT

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


Ship it!





src/master/allocator/sorter/drf/sorter.cpp (lines 343 - 345)
<https://reviews.apache.org/r/48579/#comment204139>

    How about?
    
    ```
        // Reset dirty to false so as not to re-calculate *all*
        // shares unless another dirtying operation occurs.
    ```



src/tests/sorter_tests.cpp (lines 52 - 71)
<https://reviews.apache.org/r/48579/#comment204138>

    I don't think we need the comments here since the test should just ensure that the sorted
order is correctly updated (it doesn't care about the dirty optimization in the implementation).
If we add these comments they are also likely to become stale as the implementation shifts.


- Benjamin Mahler


On June 11, 2016, 8:30 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48579/
> -----------------------------------------------------------
> 
> (Updated June 11, 2016, 8:30 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Klaus Ma.
> 
> 
> Bugs: MESOS-5600
>     https://issues.apache.org/jira/browse/MESOS-5600
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The "dirty" was set to "true" when the total resources in cluster was
> updated. But in sorter, the "dirty" was never set back as "false" after
> re-calculate share for each clients.
> 
> This patch reset the "dirty" to "false" in sort(), this can make sure
> only one client share was updated when there are allocation changes but
> not all clients in the cluster.
> 
> This can improve the performance of sorter.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/sorter/drf/sorter.cpp 65d473a5da0d846214c930c14d333040b2085b13

>   src/tests/sorter_tests.cpp eb207a36c18198588cd8a98b3860a66c2ff7a641 
> 
> Diff: https://reviews.apache.org/r/48579/diff/
> 
> 
> Testing
> -------
> 
> [==========] Running 9 tests from 1 test case.
> [----------] Global test environment set-up.
> [----------] 9 tests from SorterTest
> [ RUN      ] SorterTest.DRFSorter
> [       OK ] SorterTest.DRFSorter (1 ms)
> [ RUN      ] SorterTest.WDRFSorter
> [       OK ] SorterTest.WDRFSorter (1 ms)
> [ RUN      ] SorterTest.SplitResourceShares
> [       OK ] SorterTest.SplitResourceShares (0 ms)
> [ RUN      ] SorterTest.UpdateAllocation
> [       OK ] SorterTest.UpdateAllocation (0 ms)
> [ RUN      ] SorterTest.MultipleSlaves
> [       OK ] SorterTest.MultipleSlaves (0 ms)
> [ RUN      ] SorterTest.MultipleSlavesUpdateAllocation
> [       OK ] SorterTest.MultipleSlavesUpdateAllocation (1 ms)
> [ RUN      ] SorterTest.UpdateTotal
> [       OK ] SorterTest.UpdateTotal (0 ms)
> [ RUN      ] SorterTest.MultipleSlavesUpdateTotal
> [       OK ] SorterTest.MultipleSlavesUpdateTotal (0 ms)
> [ RUN      ] SorterTest.RevocableResources
> [       OK ] SorterTest.RevocableResources (0 ms)
> [----------] 9 tests from SorterTest (37 ms total)
> 
> [----------] Global test environment tear-down
> [==========] 9 tests from 1 test case ran. (48 ms total)
> [  PASSED  ] 9 tests.
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


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