mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mesos ReviewBot <revi...@mesos.apache.org>
Subject Re: Review Request 52678: Fixed race for `calculateShare`.
Date Mon, 10 Oct 2016 09:45:12 GMT

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



Patch looks great!

Reviews applied: [52678]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose'
ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker_build.sh

- Mesos ReviewBot


On Oct. 10, 2016, 8:05 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52678/
> -----------------------------------------------------------
> 
> (Updated Oct. 10, 2016, 8:05 a.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-6308
>     https://issues.apache.org/jira/browse/MESOS-6308
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The `calculateShare` will be called to calculate the dominant
> share metrics. There maybe a race that the `calculateShare` was
> called when `removeFramework` finished removing the allocations
> for one client. For such case, just return dominant share as 0.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/sorter/drf/sorter.cpp 790c9320f0c539b330e4fd1a9b608319f51992de

> 
> Diff: https://reviews.apache.org/r/52678/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> Also hacked the code as desribed in `MESOS-6308` to test.
> 
> 1)
> ```
> --- a/src/master/allocator/sorter/drf/sorter.cpp
> +++ b/src/master/allocator/sorter/drf/sorter.cpp
> @@ -28,6 +28,7 @@
>  #include <stout/check.hpp>
>  #include <stout/foreach.hpp>
>  #include <stout/option.hpp>
> +#include <stout/os.hpp>
> 
>  #include "logging/logging.hpp"
> 
> @@ -110,6 +111,8 @@ void DRFSorter::remove(const string& name)
>    allocations.erase(name);
>    weights.erase(name);
> 
> +  os::sleep(Seconds(1));
> +
>    if (metrics.isSome()) {
>      metrics->remove(name);
>    }
> ```
> 
> 2)
> ```
> ./bin/mesos-tests.sh --gtest_filter="PartitionTest.DisconnectedFramework"
> [==========] Running 1 test from 1 test case.
> [----------] Global test environment set-up.
> [----------] 1 test from PartitionTest
> [ RUN      ] PartitionTest.DisconnectedFramework
> I1010 16:04:43.032400 283824128 exec.cpp:162] Version: 1.1.0
> I1010 16:04:43.036418 287043584 exec.cpp:237] Executor registered on agent 8913c19c-fda2-4cbd-b2c8-283fc6839117-S0
> Received SUBSCRIBED event
> Subscribed executor on 192.168.56.1
> Received LAUNCH event
> Starting task 8d6709f4-8668-4ab7-b7b9-2d111bf15c7d
> /Users/gyliu/git/mesos/build/src/mesos-containerizer launch --command="{"shell":true,"value":"sleep
60"}" --help="false"
> Forked command at 263
> [       OK ] PartitionTest.DisconnectedFramework (4497 ms)
> [----------] 1 test from PartitionTest (4498 ms total)
> 
> [----------] Global test environment tear-down
> [==========] 1 test from 1 test case ran. (4509 ms total)
> [  PASSED  ] 1 test.
> ```
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


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