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

Update KeepMajority SplitBrainResolver strategy to avoid exception #3266

Merged
merged 1 commit into from
Jan 11, 2018

Conversation

mrrd
Copy link
Contributor

@mrrd mrrd commented Jan 11, 2018

  • Fix exception that can occur when remaining and unreachable variables both have zero elements
  • tidy up if else logic as per Refactor recommendations

This fixes a bug which has been experienced in production where remaining and unreachable have zero elements which causes an exception when trying to call .First() to get the oldest in the else (which obviously does not exist).

Unfortunately I do not have the time right now to write a test for this due to work constraints, do with this as you will.

* Fix exception that can occur when remaining and unreachable variables both have zero elements
* tidy up if else logic as per Refactor recommendations
@mrrd mrrd changed the title Update SplitBrainResolver.cs Update KeepMajority SplitBrainResolver strategy to avoid exception Jan 11, 2018
@Horusiath Horusiath self-requested a review January 11, 2018 18:34
@Aaronontheweb
Copy link
Member

Not sure what happened to TeamCity there, but the windows-unit-test stage for this PR did actually pass.

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.

3 participants