You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by to...@apache.org on 2017/07/12 17:51:22 UTC

[couchdb] branch 3429-external-size-dbs updated: cleanup and formatting

This is an automated email from the ASF dual-hosted git repository.

tonysun83 pushed a commit to branch 3429-external-size-dbs
in repository https://gitbox.apache.org/repos/asf/couchdb.git


The following commit(s) were added to refs/heads/3429-external-size-dbs by this push:
     new b3eb718  cleanup and formatting
b3eb718 is described below

commit b3eb718098f1b5e64c823e9b6d515764ca7841e5
Author: Tony Sun <to...@cloudant.com>
AuthorDate: Wed Jul 12 10:56:25 2017 -0700

    cleanup and formatting
---
 src/couch/src/couch_db.erl         | 7 ++++---
 src/couch/src/couch_db_updater.erl | 1 -
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/couch/src/couch_db.erl b/src/couch/src/couch_db.erl
index 65cd26e..e4e3a8b 100644
--- a/src/couch/src/couch_db.erl
+++ b/src/couch/src/couch_db.erl
@@ -1112,9 +1112,10 @@ prepare_doc_summaries(Db, BucketList) ->
             end,
             SummaryChunk = couch_db_updater:make_doc_summary(Db, {Body, DiskAtts}),
             Meta = Doc#doc.meta,
-            ExternalSize = ?term_size(Body),
-            Doc#doc{body = {summary, SummaryChunk, SizeInfo, AttsFd},
-                meta = [{ejson_size, ExternalSize} | Meta]}
+            Doc#doc{
+                body = {summary, SummaryChunk, SizeInfo, AttsFd},
+                meta = [{ejson_size, ?term_size(Body)} | Meta]
+            }
         end,
         Bucket) || Bucket <- BucketList].
 
diff --git a/src/couch/src/couch_db_updater.erl b/src/couch/src/couch_db_updater.erl
index eee72ee..26921bc 100644
--- a/src/couch/src/couch_db_updater.erl
+++ b/src/couch/src/couch_db_updater.erl
@@ -1076,7 +1076,6 @@ check_md5(_, _) -> throw(md5_mismatch).
 
 copy_docs(Db, #db{fd = DestFd} = NewDb, MixedInfos, Retry) ->
     DocInfoIds = [Id || #doc_info{id=Id} <- MixedInfos],
-    Compress = NewDb#db.compression,
     LookupResults = couch_btree:lookup(Db#db.id_tree, DocInfoIds),
     % COUCHDB-968, make sure we prune duplicates during compaction
     NewInfos0 = lists:usort(fun(#full_doc_info{id=A}, #full_doc_info{id=B}) ->

-- 
To stop receiving notification emails like this one, please contact
['"commits@couchdb.apache.org" <co...@couchdb.apache.org>'].