Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-8741

`Add` to sequence will not run if it races with sequence destruction

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.5.1, 1.6.0
    • libprocess
    • Mesosphere Sprint 76, Mesosphere Sprint 77
    • 1

    Description

      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.

      Attachments

        Activity

          People

            mzhu Meng Zhu
            mzhu Meng Zhu
            Greg Mann Greg Mann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: