couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [22/37] couch-replicator commit: updated refs/heads/master to aafb5f9
Date Thu, 28 Aug 2014 12:15:53 GMT
Move attachment code into couch_att

This is an attempt to isolate the attachment record and
some related code. This will allow seamless upgrades
over time.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/commit/603e4a87
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/tree/603e4a87
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/diff/603e4a87

Branch: refs/heads/master
Commit: 603e4a87cce891f558527c676ef8895556b11b96
Parents: b80c7c0
Author: Brian Mitchell <brian@p2p.io>
Authored: Wed Dec 11 23:10:56 2013 -0500
Committer: Robert Newson <rnewson@apache.org>
Committed: Tue Jul 29 15:23:53 2014 +0100

----------------------------------------------------------------------
 src/couch_replicator_worker.erl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/603e4a87/src/couch_replicator_worker.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_worker.erl b/src/couch_replicator_worker.erl
index 5c8601d..bb31d5d 100644
--- a/src/couch_replicator_worker.erl
+++ b/src/couch_replicator_worker.erl
@@ -434,7 +434,8 @@ batch_doc(#doc{atts = []}) ->
 batch_doc(#doc{atts = Atts}) ->
     (length(Atts) =< ?MAX_BULK_ATTS_PER_DOC) andalso
         lists:all(
-            fun(#att{disk_len = L, data = Data}) ->
+            fun(Att) ->
+                [L, Data] = couch_att:fetch([disk_len, data], Att),
                 (L =< ?MAX_BULK_ATT_SIZE) andalso (Data =/= stub)
             end, Atts).
 


Mime
View raw message