GitHub user nickva opened a pull request:
https://github.com/apache/couchdb-fabric/pull/84
Fix open revs quorum when error
In open_revs, do not count errors in quorum threshold calculation
Previously quorum check looked just at the number of replies and decided
quorum
was met even if it only received errors. For example, if 2 nodes are in
maintance mode it might receive this sequence of replies:
`rexi_EXIT, rexi_EXIT, ok`
In that case after the first two it would decide quorum (r=2) was met,
return
what it had so far ([]) and kill the remaining worker, who was about to
return
a valid revision.
The fix is to keep track of error replies and subtract them when deciding if
quorum was met.
Also fix a typo in another unit test ( a separate commit ).
NOTE: Do not merge yet since need to still update with a Jira ticket. Jira
is currently down.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cloudant/couchdb-fabric
fix-open-revs-quorum-when-error
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/couchdb-fabric/pull/84.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #84
----
commit a7239f7ffbbc9b008beabb5439728b08bcfe8b6f
Author: Nick Vatamaniuc <[email protected]>
Date: 2017-01-12T18:17:52Z
Fix open_revs fabric eunit test
In check_workers_error_skipped last worker should be w3 not w2.
commit f8dd1862d5643efca7e6c07e895a50c0df1a9952
Author: Nick Vatamaniuc <[email protected]>
Date: 2017-01-12T18:50:20Z
In open_revs, do not count errors in quorum threshold calculation
Previously quorum check looked just at the number of replies and decided
quorum
was met even if it only received errors. For example, if 2 nodes are in
maintance mode it might receive this sequence of replies:
`rexi_EXIT, rexi_EXIT, ok`
In that case after the first two it would decide quorum (r=2) was met,
return
what it had so far ([]) and kill the remaining worker, who was about to
return
a valid revision.
The fix is to keep track of error replies and subtract them when deciding if
quorum was met.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---