This is an automated email from the ASF dual-hosted git repository. iilyak pushed a commit to branch release-candidate-104492 in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 3a0ba3b616bd8631bf09a3a8ad545f554566b0ea Author: Paul J. Davis <paul.joseph.da...@gmail.com> AuthorDate: Tue Mar 27 10:55:48 2018 -0500 Fix shard substitution in changes feeds --- src/mem3/src/mem3_rep.erl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mem3/src/mem3_rep.erl b/src/mem3/src/mem3_rep.erl index 942f8a8..3d91877 100644 --- a/src/mem3/src/mem3_rep.erl +++ b/src/mem3/src/mem3_rep.erl @@ -341,14 +341,12 @@ find_repl_doc(SrcDb, TgtUUIDPrefix) -> SrcUUID = couch_db:get_uuid(SrcDb), S = couch_util:encodeBase64Url(crypto:hash(md5, term_to_binary(SrcUUID))), DocIdPrefix = <<"_local/shard-sync-", S/binary, "-">>, - FoldFun = fun({DocId, {Rev0, {BodyProps}}}, _) -> + FoldFun = fun(#doc{id = DocId, body = {BodyProps}} = Doc, _) -> TgtUUID = couch_util:get_value(<<"target_uuid">>, BodyProps, <<>>), case is_prefix(DocIdPrefix, DocId) of true -> case is_prefix(TgtUUIDPrefix, TgtUUID) of true -> - Rev = list_to_binary(integer_to_list(Rev0)), - Doc = #doc{id=DocId, revs={0, [Rev]}, body={BodyProps}}, {stop, {TgtUUID, Doc}}; false -> {ok, not_found} -- To stop receiving notification emails like this one, please contact iil...@apache.org.