davisp commented on a change in pull request #608: Calculate ExternalSize
Correctly for Views
URL: https://github.com/apache/couchdb/pull/608#discussion_r123805149
##########
File path: src/couch_mrview/src/couch_mrview_util.erl
##########
@@ -1130,3 +1148,9 @@ get_view_queries({Props}) ->
_ ->
throw({bad_request, "`queries` member must be a array."})
end.
+
+
+kv_external_size(KVList, Reduction) ->
+ lists:foldl(fun([[Key, _], Value], Acc) ->
+ size(term_to_binary(Key)) + size(term_to_binary(Value)) + Acc
Review comment:
Use ?term_size/1 instead of size(term_to_binary(Term)) for these.
----------------------------------------------------------------
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