Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 64A5E17D49 for ; Wed, 1 Oct 2014 20:02:41 +0000 (UTC) Received: (qmail 92941 invoked by uid 500); 1 Oct 2014 20:02:40 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 92882 invoked by uid 500); 1 Oct 2014 20:02:40 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 92871 invoked by uid 99); 1 Oct 2014 20:02:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2014 20:02:39 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of brian@streampunks.com designates 209.85.216.171 as permitted sender) Received: from [209.85.216.171] (HELO mail-qc0-f171.google.com) (209.85.216.171) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2014 20:02:33 +0000 Received: by mail-qc0-f171.google.com with SMTP id i17so1080075qcy.2 for ; Wed, 01 Oct 2014 13:02:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id:references:to; bh=OkX/g8EfdonC/WJOFtmHps0Xy2UvyYvYfgQFfdlZtPg=; b=OThvWtgRIZbWqVIta/Eeo2QAWvumACYhojkWEZiPJ4uTfC2QkpJg5zM5CrKpZ7a/dW dXCv/jMktVx2Vq97XnwdvFdxBIXcOfsBj358XwJ9lsaif6gkKdkd+bHUZO+gUrgaFr7v 4wCI3spg06qzFdaTvh2fTeXMIpu5FqQO4Xv1uyYhQ/sUJAWsYS65aF3DqwrjqahuOGyF 0R7OJig9zB9cNHa74w3b29Ra5HOett5+XxyQb26uaGHW1FxzBt23sBcBmt6u+3cco75g Y57J/Vi/Dr+/F5MbLW0JuaHtiDYT38SBt0trJlSIPRDmKmvigMMosXQlX25zy72WJ6g+ B1ag== X-Gm-Message-State: ALoCoQnoZM3ROTNrAQtei75q2OUoblIRTlQQqed7QNDnMOhm61H3vgZYY5PE0xgwE41BY6L3GPJF X-Received: by 10.224.130.199 with SMTP id u7mr33645492qas.5.1412193732559; Wed, 01 Oct 2014 13:02:12 -0700 (PDT) Received: from [10.0.8.28] (static-100-33-141-114.nycmny.fios.verizon.net. [100.33.141.114]) by mx.google.com with ESMTPSA id n78sm1464435qgd.41.2014.10.01.13.02.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 01 Oct 2014 13:02:12 -0700 (PDT) Sender: Brian Mitchell Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1988\)) Subject: Re: Are attachments duplicated for each revision as well? From: Brian Mitchell In-Reply-To: Date: Wed, 1 Oct 2014 16:02:11 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <24AC6D7C-48CA-43D7-BEDA-D2EA735621DF@standardanalytics.io> References: To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1988) X-Virus-Checked: Checked by ClamAV on apache.org The attachment will be stored once and each revision will retain a = reference to that attachment (including when it was added, called revpos, so replication should be efficient too). Compaction will = copy the attachments over and should retain a single copy for each unique attachment. Attachments are identified by name and can be replaced without mutating = old references to documents with attachments of the same name. If you pass the _attachments section and leave out stubs = for any existing attachments, that is interpreted as a delete. Brian. > On Oct 1, 2014, at 3:53 PM, Eric B wrote: >=20 > Given that attachments are seemingly stored as key/value pairs within = a > document, does that mean that each revision of a document contains the > attachments as well? Or are they stored independently? >=20 > For instance, given a 5kb document with a 100Mb attachment that has 10 = revs > (where the attachment was added in rev 1), will the total storage > requirements be 5kb * 10 + 100Mb or (5kb + 10Mb) * 10? >=20 > Thanks, >=20 > Eric