Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature flag opt-in for re-subscribe #337

Merged
merged 1 commit into from
Mar 5, 2018
Merged

feature flag opt-in for re-subscribe #337

merged 1 commit into from
Mar 5, 2018

Conversation

rboyer
Copy link
Contributor

@rboyer rboyer commented Nov 8, 2017

I noticed that the v1 scheduler workflow isn't re-subscribe friendly, which makes implementing proper heartbeat handling in a framework tricky.

This PR adds the bare minimum hooks necessary to test out re-SUBSCRIBE on an opt-in basis. It "should" be safe to do without the feature-flag, but the comments by jdef in the source imply otherwise.

Doing this without the opt-in does have repercussions on anyone who is currently invoking a SUBSCRIBE call. To avoid issues with receiving one last scheduler.Event_ERROR message on the old subscription socket, you have to do some additional state tracking in framework code to correctly handle it. As I'm not using the helpers in the extras directory, I'm not sure the right way to handle the workflow there so I didn't make any changes to try and use the re-subscribe changes there.

@coveralls
Copy link

coveralls commented Nov 8, 2017

Coverage Status

Coverage decreased (-0.2%) to 58.197% when pulling 5212e88 on rboyer:resubscribe into c488712 on mesos:master.

@jdef
Copy link
Contributor

jdef commented Nov 20, 2017

Thanks for this PR! The scheduler not receiving heartbeat signals from the master is a good example of a condition not picked up by the default error detection in the httpsched impl.

@jdef
Copy link
Contributor

jdef commented Nov 20, 2017

#255 #277

@@ -96,6 +97,14 @@ func MaxRedirects(mr int) Option {
}
}

func AllowReconnection(v bool) Option {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mind writing a minimal comment for this func that explains how it effectively alters the behavior of the client?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm going to add comments in a subsequent PR

@jdef jdef merged commit 4adad49 into mesos:master Mar 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants