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

Anti-entropy sync services/checks missing entirely from Consul #850

Merged
merged 4 commits into from
Apr 10, 2015

Conversation

ryanuber
Copy link
Member

@ryanuber ryanuber commented Apr 8, 2015

Fixes #839
/cc @armon

l.serviceStatus[id] = syncStatus{inSync: false}
}
}

if services != nil {
Copy link
Member

Choose a reason for hiding this comment

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

It looks like we guard against services result being nil. Can we move that above the new code and just do something like:

if services == nil {
 services = make(map...)
}

This way we can avoid the guard logic and nesting. I think the new code here may be susceptible to a nil pointer dereference in those cases. Not that I see how we could get nil back.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah good catch.

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed in 60a6da2

@armon
Copy link
Member

armon commented Apr 10, 2015

Minor nitpick, but LGTM!

ryanuber added a commit that referenced this pull request Apr 10, 2015
Anti-entropy sync services/checks missing entirely from Consul
@ryanuber ryanuber merged commit 585fd2a into master Apr 10, 2015
@ryanuber ryanuber deleted the f-ae-missing branch April 10, 2015 18:17
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.

Anti-Entropy does not properly handle case with client state and lost-server state
2 participants