Meng Zhu created MESOS-8741:
-------------------------------
Summary: `Add` to sequence will not run if it races with sequence
destruction
Key: MESOS-8741
URL: https://issues.apache.org/jira/browse/MESOS-8741
Project: Mesos
Issue Type: Bug
Environment:
Reporter: Meng Zhu
Assignee: Meng Zhu
Adding item to sequence is realized by dispatching `add()` to the sequence
actor. However, this could race with the sequence actor destruction.:
After the dispatch but before the dispatched `add()` message gets processed by
the sequence actor, if the sequence gets destroyed, a terminate message will be
injected to the *head* of the message queue. This would result in the
destruction of the sequence without the `add()` call ever gets processed. User
would end up with a pending future and the future's `onDiscarded' would not be
triggered during the sequence destruction.
The solution is to set the `inject` flag to `false` so that the terminating
message is enqueued to the end of the sequence actor message queue. All `add()`
messages that happen before the destruction will be processed before the
terminating message.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)