You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/11/22 18:01:59 UTC

[GitHub] eiri commented on a change in pull request #1470: Fix calculation of external size for attachments

eiri commented on a change in pull request #1470: Fix calculation of external size for attachments
URL: https://github.com/apache/couchdb/pull/1470#discussion_r235797986
 
 

 ##########
 File path: src/couch/src/couch_db.erl
 ##########
 @@ -914,7 +914,18 @@ prep_and_validate_update(Db, #doc{id=Id,revs={RevStart, Revs}}=Doc,
         % new doc, and we have existing revs.
         % reuse existing deleted doc
         if OldFullDocInfo#full_doc_info.deleted orelse AllowConflict ->
-            {validate_doc_update(Db, Doc, fun() -> nil end), Doc};
+            case couch_doc:has_stubs(Doc) of
+                true ->
+                    #full_doc_info{rev_tree=RevTree} = OldFullDocInfo,
+                    Leafs = couch_key_tree:get_all_leafs(RevTree),
+                    [{Leaf, DiskRevs} | _] = lists:reverse(Leafs),
 
 Review comment:
   1. Maybe, but I can't guarantee that. I just closed another blocker yesterday and working on this now, but here is also inclusion of changes for `active_size` we've discussed on dev mail list which makes a scope of this PR bigger.
   2. Yes I am. Sorry, I'm working on those issues as fast as I can.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services