mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gaston Kleiman <gas...@mesosphere.io>
Subject Re: Review Request 63577: Fixed a task status update race in default executor tests.
Date Tue, 14 Nov 2017 19:42:15 GMT

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


Fix it, then Ship it!





src/tests/default_executor_tests.cpp
Line 400 (original), 458 (patched)
<https://reviews.apache.org/r/63577/#comment268579>

    Nit: at this point the `killedUpdate` futures could be ready, so doing the following would
be nice:
    
    ```
    ASSERT_TRUE(killedUpdate1.isPending());
    ASSERT_TRUE(killedUpdate2.isPending());
    ASSERT_TRUE(killedUpdate3.isPending());
    ```



src/tests/default_executor_tests.cpp
Line 419 (original), 465 (patched)
<https://reviews.apache.org/r/63577/#comment268580>

    Nit: the following assert would be nice here:
    
    ```
    // Verify that only the tasks in the first group were killed.
    ASSERT_TRUE(killedUpdate3.isPending());
    ```



src/tests/default_executor_tests.cpp
Line 1176 (original), 1282 (patched)
<https://reviews.apache.org/r/63577/#comment268581>

    I'd add here:
    
    ```
    ASSERT_TRUE(killedUpdate2.isPending());
    ```


- Gaston Kleiman


On Nov. 10, 2017, 5:02 a.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63577/
> -----------------------------------------------------------
> 
> (Updated Nov. 10, 2017, 5:02 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Gaston Kleiman.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Previously in the test `DefaultExecutorTest.KillMultipleTasks` and
> `DefaultExecutorTest.KillTaskGroupOnTaskFailure`, when launching a
> task group which has multiple tasks, we expected the scheduler will
> receive all the TASK_STARTING status updates before receiving any
> TASK_RUNNING status updates. However this is not guaranteed, e.g.,
> it is possible for the scheduler to receive TASK_RUNNING for the
> first task before receiving TASK_STARTING for the second task.
> 
> So in this patch, we used `Sequence` to guarantee the order of
> TASK_STARTING and TASK_RUNNING for each task but do not care about
> the order between tasks.
> 
> The following 3 tests have their own solutions to handle this issue,
> in this patch, I updated them to use the above solution.
>   `DefaultExecutorTest.KillTask`
>   `DefaultExecutorTest.CommitSuicideOnKillTask`
>   `DefaultExecutorTest.ROOT_ContainerStatusForTask`
> 
> 
> Diffs
> -----
> 
>   src/tests/default_executor_tests.cpp 65113985acc0a8fac00374b074ef568aaa22c7ac 
>   src/tests/mesos.hpp e25defeb55608136e77363aa48cf820092a13a59 
> 
> 
> Diff: https://reviews.apache.org/r/63577/diff/2/
> 
> 
> Testing
> -------
> 
> This patch touched 5 tests:
> 1. KillTask
> 2. KillMultipleTasks
> 3. KillTaskGroupOnTaskFailure
> 4. CommitSuicideOnKillTask
> 5. ROOT_ContainerStatusForTask
> 
> I ran each of them repeatedly (20 times), and all of them succeeded.
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


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