jiangphcn commented on a change in pull request #1370: [5/5] Clustered Purge
Implementation
URL: https://github.com/apache/couchdb/pull/1370#discussion_r198775968
##########
File path: src/fabric/src/fabric_rpc.erl
##########
@@ -236,14 +240,26 @@ get_missing_revs(DbName, IdRevsList, Options) ->
end).
update_docs(DbName, Docs0, Options) ->
- case proplists:get_value(replicated_changes, Options) of
- true ->
- X = replicated_changes;
- _ ->
- X = interactive_edit
+ {Docs1, Type} = case couch_util:get_value(read_repair, Options) of
+ NodeRevs when is_list(NodeRevs) ->
+ Filtered = read_repair_filter(DbName, Docs0, NodeRevs, Options),
+ {Filtered, replicated_changes};
+ undefined ->
+ X = case proplists:get_value(replicated_changes, Options) of
Review comment:
The `Options` passed on to `proplists:get_value/2` looks like
```
[replicated_changes,
{user_ctx,{user_ctx,<<"chttpd_db_test_admin">>,[<<"_admin">>],<<"default">>}},
{w,"1"}]
```
So need to use `proplists:get_value/2` to check value of
`replicated_changes`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services