Skip to content

Use majority write concern to fix flaky test #2177

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
Apr 22, 2020

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Apr 22, 2020

Q A
Type bug
BC Break no

Summary

Fixes a test that randomly fails due to reading from secondaries. While a majority write concern doesn't eliminate reading from a stale secondary, the only way to do so was to check how many healthy nodes the replica set in question has and using that for write concern. I'll take a significantly reduced number of failures over the current state anytime.

@alcaeus alcaeus added the Task label Apr 22, 2020
@alcaeus alcaeus requested a review from malarzm April 22, 2020 07:53
@alcaeus alcaeus self-assigned this Apr 22, 2020
Copy link
Member

@malarzm malarzm left a comment

Choose a reason for hiding this comment

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

Sounds good to me 👍

@malarzm malarzm merged commit d91c17b into doctrine:1.3.x Apr 22, 2020
@alcaeus alcaeus deleted the fix-flaky-test branch April 23, 2020 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants