tonysun83 commented on a change in pull request #849: Fix external size bug
when seq btree exists
URL: https://github.com/apache/couchdb/pull/849#discussion_r141780529
##########
File path: src/couch_mrview/src/couch_mrview_util.erl
##########
@@ -800,7 +800,10 @@ reduced_external_size(Tree) ->
case couch_btree:full_reduce(Tree) of
{ok, {_, _, Size}} -> Size;
% return 0 for versions of the reduce function without Size
- {ok, {_, _}} -> 0
+ {ok, {_, _}} -> 0;
+ % This is for the case when seq_btree or key_byseq_btree is not
+ % null. Reduces will return an integer.
+ {ok, Size} when is_integer(Size) -> Size
Review comment:
Ooops, you're right. I think we may need to modify our seq_tree reduce
function:
https://github.com/apache/couchdb/blob/seqt-external-size-bug/src/couch/src/couch_db_updater.erl#L566-L570
I wonder if we can get away with just using couch_btree:size for the
seq_indexed trees.
Thoughts @davisp?
----------------------------------------------------------------
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