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 5A9699124 for ; Fri, 16 Mar 2012 15:18:28 +0000 (UTC) Received: (qmail 11411 invoked by uid 500); 16 Mar 2012 15:18:26 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 11343 invoked by uid 500); 16 Mar 2012 15:18:26 -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 11334 invoked by uid 99); 16 Mar 2012 15:18:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Mar 2012 15:18:26 +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 (nike.apache.org: domain of kxepal@gmail.com designates 74.125.83.52 as permitted sender) Received: from [74.125.83.52] (HELO mail-ee0-f52.google.com) (74.125.83.52) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Mar 2012 15:18:19 +0000 Received: by eekd4 with SMTP id d4so2510456eek.11 for ; Fri, 16 Mar 2012 08:17:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=X4LYUH3ttHjWQ837hj6+z97q++LFyvbPUtBHA6/wnTU=; b=QBq3k3ROgwkBoqsbLJaQkUMhlJLzuZb1jyNcEU0dmKbRhjaljG2zohKiozYK0tjENh SbA1rSsjalXlVANooMnlV+/LzaOJ+aVx9vT9RL6SDKN7HXTsvW8bKNWuv6g+9kvP7zIJ +q5l/KxzVuhUKdF5TJ7S+vBHzqYMdYVXECK3C1bFuMR3qsY/Y42HgMxUAHDDokwbL8Us 5ldtwpwNApO4JpgSBoM5ub2bBUZbyFyuKBIv5atOipZaoBYII3RO06Vip+nZAU2XLhA6 RZ6q7MpVNPRN5mhHwRlXTX9lzvbDD0SxOee9pg322EnTjDFR4yGo3tnZUd7Ciq7s7HLZ FEuQ== MIME-Version: 1.0 Received: by 10.229.102.148 with SMTP id g20mr1068112qco.124.1331911078417; Fri, 16 Mar 2012 08:17:58 -0700 (PDT) Received: by 10.224.192.67 with HTTP; Fri, 16 Mar 2012 08:17:58 -0700 (PDT) In-Reply-To: References: <003240CB-2132-439B-AD7D-6AFBB00DA352@apache.org> Date: Fri, 16 Mar 2012 18:17:58 +0300 Message-ID: Subject: Re: Size of couchdb documents From: Alexander Shorin To: user@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Fri, Mar 16, 2012 at 7:09 PM, Robert Newson wrote: > That advice probably dates to when we made a fully random UUID. That advice based on wiki note: http://wiki.apache.org/couchdb/HTTP_Document_API#POST ...and fully explained in method description: > If doc has no _id then the server will allocate a random ID and a new doc= ument will be created. Otherwise the doc=E2=80=99s _id will be used to iden= tity the document to create or update. Trying to update an existing documen= t with an incorrect _rev will raise a ResourceConflict exception. > Note that it is generally better to avoid saving documents with no _id an= d instead generate document IDs on the client side. This is due to the fact= that the underlying HTTP POST method is not idempotent, and an automatic r= etry due to a problem somewhere on the networking stack may cause multiple = documents being created in the database. If docid is specified on client, PUT request is used instead of POST one. Workaround is already known: use /_uuids server resource for doc ids source, but implementing this trick on library level is not good idea due to it force to produce additional requests behind of scene. -- ,,,^..^,,,