mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Mann <g...@mesosphere.io>
Subject Re: Review Request 66322: Fixed a potential race in `Sequence`.
Date Mon, 02 Apr 2018 23:33:44 GMT

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


Fix it, then Ship it!





3rdparty/libprocess/include/process/sequence.hpp
Lines 117-122 (patched)
<https://reviews.apache.org/r/66322/#comment281031>

    How about:
    
    "NOTE: When we discard the notifier future, any `onDiscard()` callbacks registered on
`promise->future` will be invoked, but `onDiscard` callbacks registered on the future returned
by `add()` will NOT be invoked. This is because currently discards do not propagate through
`dispatch()`. In other words, users should be careful when registering `onDiscard` callbacks
on the returned future."



3rdparty/libprocess/include/process/sequence.hpp
Lines 189 (patched)
<https://reviews.apache.org/r/66322/#comment281032>

    s/happened/which happened/


- Greg Mann


On March 28, 2018, 1:15 a.m., Meng Zhu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66322/
> -----------------------------------------------------------
> 
> (Updated March 28, 2018, 1:15 a.m.)
> 
> 
> Review request for mesos, Chun-Hung Hsiao, Greg Mann, and Jie Yu.
> 
> 
> Bugs: MESOS-8741
>     https://issues.apache.org/jira/browse/MESOS-8741
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Adding item to sequence is realized by dispatching
> `add()` to the sequence actor. However, this could
> race with the sequence actor termination.
> 
> This patch fixes this by enqueueing the terminate
> message at the end of the message queue.
> 
> Also removed the clock settle in the test `DiscardAll`.
> As the processing of the messages are now guaranteed
> to happen before the actor termination.
> 
> Also added comments to clarify the onDiscard propagation.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/sequence.hpp b4d7593221bf225a9e53e3b7f94e45624400078a

>   3rdparty/libprocess/src/tests/sequence_tests.cpp 43911b6c7a4220a4b8ea1baca191035355817e7b

> 
> 
> Diff: https://reviews.apache.org/r/66322/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> 
> After modifying test `DiscardAll`, it fails with the old implementation. After modifying
the `inject` flag, it passes.
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>


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