This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch filter-out-responses-with-empty-revisions
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit a53b6aaaba52f4358572fdcdba6d97c47c1209fe
Author: Nick Vatamaniuc <[email protected]>
AuthorDate: Thu Dec 6 13:47:49 2018 -0500

    Filter out empty missing_revs results in mem3_rep
    
    This avoids needlessly making fabric:update_docs calls with emtpy doc lists.
---
 src/mem3/src/mem3_rep.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mem3/src/mem3_rep.erl b/src/mem3/src/mem3_rep.erl
index b65fa7a..8cbd20b 100644
--- a/src/mem3/src/mem3_rep.erl
+++ b/src/mem3/src/mem3_rep.erl
@@ -407,7 +407,7 @@ changes_enumerator(#full_doc_info{}=FDI, #acc{revcount=C, 
infos=Infos}=Acc0) ->
 
 
 replicate_batch(#acc{target = #shard{node=Node, name=Name}} = Acc) ->
-    case find_missing_revs(Acc) of
+    case [{Id, R, A} || {Id, R, A} <- find_missing_revs(Acc), R =/= []] of
     [] ->
         ok;
     Missing ->

Reply via email to