mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Meng Zhu <m...@mesosphere.io>
Subject Re: Review Request 66322: Fixed a potential race in `Sequence`.
Date Tue, 03 Apr 2018 00:35:28 GMT

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

(Updated April 2, 2018, 5:35 p.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 (updated)
-----

  3rdparty/libprocess/include/process/sequence.hpp b4d7593221bf225a9e53e3b7f94e45624400078a

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



Diff: https://reviews.apache.org/r/66322/diff/2/

Changes: https://reviews.apache.org/r/66322/diff/1-2/


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