You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by gi...@git.apache.org on 2017/09/29 01:10:28 UTC

[GitHub] jiangphcn commented on a change in pull request #849: Fix external size bug when seq btree exists

jiangphcn 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_r141770860
 
 

 ##########
 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:
   After adding this line, we can get matched clause. However, it looks that the returned size is the number of indexed documents instead of external size for seq_indexed tree and keyseq_indexed tree.
 
----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services