Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 46394 invoked from network); 5 Nov 2010 19:23:28 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Nov 2010 19:23:28 -0000 Received: (qmail 32310 invoked by uid 500); 5 Nov 2010 19:23:58 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 32279 invoked by uid 500); 5 Nov 2010 19:23:58 -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 32271 invoked by uid 99); 5 Nov 2010 19:23:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Nov 2010 19:23:58 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of newmaniese@gmail.com designates 74.125.83.52 as permitted sender) Received: from [74.125.83.52] (HELO mail-gw0-f52.google.com) (74.125.83.52) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Nov 2010 19:23:52 +0000 Received: by gwj22 with SMTP id 22so2537760gwj.11 for ; Fri, 05 Nov 2010 12:23:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=d7TzfU0W6Mwa0gtSp2mzdIfvDtW6N3u21Vw2ezgdQmc=; b=dKB7i9mn5y5oNSMRyw0NaGMSQANh69F9TsfBi2oKUM/72V1wTk8QoJ9eq/u5lWzu6E xRNsf1k/eRI2RHeARvdAkZKj+wzwue59EIu5+hEmslE8FFJ9jqfGRAzQnamEM/uzHloG QyL5XvdGvCpOLxrbw5Yz5P6F+fa95LRT5UBkE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=VjtDZazwC69ngkvCTXIzRM4pb3IFcA0aHsoUVqZAIQ5QZUBFSrO7LjKezfZowKxX74 3sp5bWeA0ZH+Zzc2j5TqVQmhbGR7IlBPISgLeotodwSrPRuwlsSV/198/uU5jm7GBpUJ WmjOf+ahN1hSXE7NwJdJg5FsPPdSIhQ8426HY= MIME-Version: 1.0 Received: by 10.42.41.16 with SMTP id n16mr1757992ice.270.1288985011136; Fri, 05 Nov 2010 12:23:31 -0700 (PDT) Received: by 10.42.229.202 with HTTP; Fri, 5 Nov 2010 12:23:31 -0700 (PDT) In-Reply-To: References: Date: Fri, 5 Nov 2010 15:23:31 -0400 Message-ID: Subject: Re: Write race conditions, working without _rev From: Michael To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Very excellent. Thank you! On Fri, Nov 5, 2010 at 1:40 PM, Mark J. Reed wrote: > Look at update handlers. > > On Fri, Nov 5, 2010 at 12:44 PM, Michael wrote: >> On Fri, Nov 5, 2010 at 12:03 PM, Paul Davis wrote: >>> >>> In the second case, the second person to write the document wins, >>> erasing any changes the first write's effects. The first writer will >>> then be in a state where his view of the database will be >>> inconsistent. The thing his, he can't know because without requiring a >>> _rev token he'll never get a notification of any sort of error. >> >> True, that is one workflow. I am not too concerned however about >> updates trampling each other each update does not care about previous >> revisions. This isn't people updating objects, but applications =A0To be >> honest, I will catch the conflict and just ignore it because the data >> then is "new enough", however if I wanted the newest data, I would >> have to have: >> >> Read object to get rev >> Try save >> if resource conflict: >> =A0 =A0read object for rev again >> =A0 =A0try save >> =A0 =A0if resource conflict: >> =A0 =A0 =A0 =A0assume newer data and pass >> >> If that happens, I have 4 different hits to the database for nothing. >> On a multithreaded server, this would happen quite frequently. >> >> In my workflow, the ideal situation would be to write once, without a >> read, and for Couch to just accept the change in order. >> >> Is that possible? >> >> Thanks, >> >> Michael >> > > > > -- > Mark J. Reed >