Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8FD4E11CDD for ; Wed, 6 Aug 2014 18:17:59 +0000 (UTC) Received: (qmail 97844 invoked by uid 500); 6 Aug 2014 18:17:52 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 97668 invoked by uid 500); 6 Aug 2014 18:17:52 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 96894 invoked by uid 99); 6 Aug 2014 18:17:52 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Aug 2014 18:17:52 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id C5579924878; Wed, 6 Aug 2014 18:17:51 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rnewson@apache.org To: commits@couchdb.apache.org Date: Wed, 06 Aug 2014 18:18:12 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [22/27] couch-replicator commit: updated refs/heads/windsor-merge to 75e5ba1 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/windsor-merge Commit: 603e4a87cce891f558527c676ef8895556b11b96 Parents: b80c7c0 Author: Brian Mitchell Authored: Wed Dec 11 23:10:56 2013 -0500 Committer: Robert Newson 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).