davisp commented on a change in pull request #606: Use Ejson Body Instead of 
Compressed Body for External size
URL: https://github.com/apache/couchdb/pull/606#discussion_r127043085
 
 

 ##########
 File path: src/couch/src/couch_db_updater.erl
 ##########
 @@ -1467,6 +1474,16 @@ make_doc_summary(#db{compression = Comp}, {Body0, 
Atts0}) ->
     SummaryBin = ?term_to_bin({Body, Atts}),
     couch_file:assemble_file_chunk(SummaryBin, couch_crypto:hash(md5, 
SummaryBin)).
 
+
+get_meta_body_size(Meta, Summary) ->
+    case lists:keyfind(ejson_size, 1, Meta) of
+        {ejson_size, ExternalSize} ->
+            ExternalSize;
+        false ->
+            couch_compress:decompress(Summary)
 
 Review comment:
   Also looking at the code I don't see where you call it.
 
----------------------------------------------------------------
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

Reply via email to