Andrei Sekretenko created MESOS-9746:
----------------------------------------

             Summary: Consolidate the logic of sending update messages on 
FrameworkInfo changes.
                 Key: MESOS-9746
                 URL: https://issues.apache.org/jira/browse/MESOS-9746
             Project: Mesos
          Issue Type: Improvement
          Components: master
            Reporter: Andrei Sekretenko


Currently the logic of sending FRAMEWORK_UPDATED event and 
UpdateFrameworkMessage is scattered throughout different code paths on which 
framework re-subscription occurs.

On some of the paths the UpdateFrameworkMessage message is not being sent to 
slaves,  which looks like a bug:
[https://github.com/apache/mesos/blob/6eeee96f98d5df02e937bee6f701b788bfb28de9/src/master/master.cpp#L3149]

Moreover, the UPDATE_FRAMEWORK call 
(https://issues.apache.org/jira/browse/MESOS-7258) adds one more code path on 
which these messages are sent.

This logic is already very error-prone _and makes it difficult to keep the 
side-effects of the UPDATE_FRAMEWORK call consistent with the framework 
re-subscription._

One of the possible approaches is to move this logic into the existing 
Master::updateFramework(Framework*, ...) method, which is called on all of 
these paths.
*NOTE*: there are at least two things which might require a special care with 
this approach:
- Information about framework state, reregistration time and so on in the the 
FRAMEWORK_UPDATED event.
- Ordering between relinking to the framework and sending 
UpdateFrameworkMessage.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to