eiri commented on a change in pull request #560: Fix broken eunit test in
changes_since_test_ test suite
URL: https://github.com/apache/couchdb/pull/560#discussion_r119602569
##########
File path: src/couch_mrview/src/couch_mrview_util.erl
##########
@@ -344,6 +344,9 @@ get_view_changes_count(View) ->
{#btree{}, nil} ->
couch_btree:fold_reduce(SBtree, CountFun, 0, []);
{nil, #btree{}} ->
+ couch_btree:fold_reduce(KSBtree, CountFun, 0, []);
+ {#btree{}, #btree{}} ->
+ couch_btree:fold_reduce(SBtree, CountFun, 0, []),
Review comment:
You are doing reduce on seq btree here just to throw away its result and run
reduce on key btree right after that. If you are trying to prefer key-seq btree
over seq btree when it's present, the right way to go about it is to change
above clause to `{_, #btree{}} ->`
----------------------------------------------------------------
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