diff options
author | Paul J. Davis <paul.joseph.davis@gmail.com> | 2018-03-28 18:09:10 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-28 18:09:10 -0500 |
commit | 80df58bf8b8fdb6e5225bd029dcddbad76f690c4 (patch) | |
tree | 2328f18a90f9c2ad01c7f0d3650c91af0e346c35 | |
parent | dab55260c2beea9b321618f7b536de2f7f13f677 (diff) | |
parent | 99a64b2508e815e5a820c802b0d9c802659e72d3 (diff) | |
download | couchdb-fix-os-process-killer.tar.gz |
Merge branch 'master' into fix-os-process-killerfix-os-process-killer
-rw-r--r-- | src/mem3/src/mem3_rep.erl | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mem3/src/mem3_rep.erl b/src/mem3/src/mem3_rep.erl index 942f8a8e0..3d9187796 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} |