Skip to content

RUBY-912 Use electionId from server descriptions to detect stale primaries #644

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

Merged
merged 1 commit into from
Jul 1, 2015

Conversation

estolfo
Copy link
Contributor

@estolfo estolfo commented Jun 26, 2015

No description provided.

@estolfo estolfo force-pushed the RUBY-912-election-id branch from 4f3a427 to f28c0aa Compare June 29, 2015 10:40
@durran
Copy link
Member

durran commented Jun 30, 2015

Looks good.

@estolfo estolfo force-pushed the RUBY-912-election-id branch from f28c0aa to 9dec540 Compare July 1, 2015 08:45
estolfo added a commit that referenced this pull request Jul 1, 2015
RUBY-912 Use electionId from server descriptions to detect stale primaries
@estolfo estolfo merged commit a57062e into mongodb:master Jul 1, 2015
end
@max_election_id = description.election_id
Copy link
Member

Choose a reason for hiding this comment

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

I think this is different from the spec, which says maxElectionId is "The largest electionId ever reported by a primary." In the spec's pseudocode it only updates maxElectionId if the primary being elected has an electionId. Here, though, I think you'll set maxElectionId to null if a primary is elected with no electionId. Let me write up a test that shows what I mean.

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.

3 participants