iilyak commented on a change in pull request #3568:
URL: https://github.com/apache/couchdb/pull/3568#discussion_r633790403



##########
File path: src/chttpd/src/chttpd_changes.erl
##########
@@ -441,37 +462,43 @@ send_changes(Acc, Dir, FirstRound) ->
             fabric2_db:fold_changes(Db, StartSeq, DbEnumFun, Acc, Opts)
     end.
 
-
 can_optimize(true, {doc_ids, _Style, DocIds}) ->
-    MaxDocIds = config:get_integer("couchdb",
-        "changes_doc_ids_optimization_threshold", 100),
-    if length(DocIds) =< MaxDocIds ->
-        {true, fun send_changes_doc_ids/6};
-    true ->
-        false
+    MaxDocIds = config:get_integer(
+        "couchdb",
+        "changes_doc_ids_optimization_threshold",
+        100
+    ),
+    if
+        length(DocIds) =< MaxDocIds ->
+            {true, fun send_changes_doc_ids/6};
+        true ->
+            false
     end;
 can_optimize(true, {design_docs, _Style}) ->
     {true, fun send_changes_design_docs/6};
 can_optimize(_, _) ->
     false.
 
-
 send_changes_doc_ids(Db, StartSeq, Dir, Fun, Acc0, {doc_ids, _Style, DocIds}) 
->
     Results = fabric2_db:get_full_doc_infos(Db, DocIds),
-    FullInfos = lists:foldl(fun
-        (#full_doc_info{}=FDI, Acc) -> [FDI | Acc];
-        (not_found, Acc) -> Acc
-    end, [], Results),
+    FullInfos = lists:foldl(
+        fun

Review comment:
       0




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to