-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid read docs twice when filtered
_changes
is triggered (#4862)
* Add more tests for couch_changes and fabric changes Add more tests to ensure the response is the same before and after the code change. Code coverage improvements - chttpd_changes_test.erl: 99% -> 100% - couch_changes.erl: 80% -> 82% - fabric_rpc.erl: 56% -> 61% * Verify the number of calls to `open_doc/3` when requesting `_changes` * Avoid read docs twice when filtered _changes is triggered - When filered `_changes` is triggered, `open_revs()` will read docs. If request parameter has `include_docs=true`, then `doc_member()` will also read docs. To avoid the above behavior, changed `filter/3` to `filter/5`. - When using filtered `_changes` with `style=all_docs`, `conflicts=true` and `include_docs=true`, the response should contain the `_conflicts` field. Add `open_all_revs_include_doc/2` to include `_conflicts` field. - If conflicted docs contain a deleted doc, the deleted `rev` value should not appear in the `doc` field. Add `Doc#doc.deleted =:= false` filter to avoid this behaviour. * Update tests to verify the number of calls to `open_doc/3`
- Loading branch information
1 parent
5c6aeab
commit 2d12ab0
Showing
5 changed files
with
1,542 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.