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

[WIP] Active/passive failover support by worker manager clusters #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

keitabyte
Copy link
Contributor

[WIP] Active/passive failover support by worker manager clusters

Summary
This PR adds explicit failover strategy, with an initial support for active/passive failover based on clusters of managers that are assigned a priority by cluster. The highest priority cluster is then determined to be the currently active cluster of managers. Given active/passive failover is configured, a heart beat is initialized in each manager. This heart beat registers a given manager's cluster as active, evicts outdated active cluster, and if a given manager belongs to the highest priority active cluster, it will process queued work.

f.lock.Unlock()
return
}
f.lock.Unlock()

Choose a reason for hiding this comment

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

why not defer the unlock?

@@ -142,6 +162,12 @@ func (f *simpleFetcher) Closed() bool {
}

func (f *simpleFetcher) inprogressMessages() []string {
f.lock.Lock()
if !f.active {
f.lock.Unlock()

Choose a reason for hiding this comment

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

same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants