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_r123802734
 
 

 ##########
 File path: src/couch/src/couch_db_updater.erl
 ##########
 @@ -1086,8 +1088,15 @@ copy_docs(Db, #db{fd = DestFd} = NewDb, MixedInfos, 
Retry) ->
         {NewRevTree, FinalAcc} = couch_key_tree:mapfold(fun
             (_Rev, #leaf{ptr=Sp}=Leaf, leaf, SizesAcc) ->
                 {Body, AttInfos} = copy_doc_attachments(Db, Sp, DestFd),
+                IsComp = couch_compress:is_compressed(Body, Compress),
+                EJsonBody = case IsComp of
 
 Review comment:
   This check isn't quite right as we might have changed the compression and 
we're looking at something that's not been compressed with the same method. 
Just use is_binary and then pass it to couch_compress:decompress if so.
 
----------------------------------------------------------------
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