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_r123802205
 
 

 ##########
 File path: src/couch/src/couch_db.erl
 ##########
 @@ -1111,7 +1111,9 @@ prepare_doc_summaries(Db, BucketList) ->
                 nil
             end,
             SummaryChunk = couch_db_updater:make_doc_summary(Db, {Body, 
DiskAtts}),
-            Doc#doc{body = {summary, SummaryChunk, SizeInfo, AttsFd}}
+            Meta = Doc#doc.meta,
+            Doc#doc{body = {summary, SummaryChunk, SizeInfo, AttsFd},
+                meta = [{ejson_body, Body} | Meta]}
 
 Review comment:
   You should just store the size of the body here rather than pass the whole 
body. By doing that you're effectively nullifying the summary optimization of 
only passing binaries in and out of couch_db_updater.
 
----------------------------------------------------------------
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