Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 13234 invoked from network); 8 Feb 2009 01:36:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Feb 2009 01:36:25 -0000 Received: (qmail 68893 invoked by uid 500); 8 Feb 2009 01:36:24 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 68854 invoked by uid 500); 8 Feb 2009 01:36:24 -0000 Mailing-List: contact dev-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 dev@couchdb.apache.org Received: (qmail 68843 invoked by uid 99); 8 Feb 2009 01:36:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Feb 2009 17:36:24 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.68.5.15] (HELO relay01.pair.com) (209.68.5.15) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 08 Feb 2009 01:36:15 +0000 Received: (qmail 74282 invoked from network); 8 Feb 2009 01:35:53 -0000 Received: from 96.33.90.152 (HELO ?192.168.1.195?) (96.33.90.152) by relay01.pair.com with SMTP; 8 Feb 2009 01:35:53 -0000 X-pair-Authenticated: 96.33.90.152 Message-Id: From: Damien Katz To: dev@couchdb.apache.org In-Reply-To: <867439E1-D87A-4BCC-9732-94C1C6018B72@gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: couchdb transactions changes Date: Sat, 7 Feb 2009 20:35:53 -0500 References: <84F66023-030A-4669-B75C-3DCC92D71A78@yahoo.com> <3B1EB33E-D224-43E2-9FDC-D7493CD5BFDD@pobox.com> <59473D22-6EA5-4CE2-A193-8F4938C2D6BB@apache.org> <82C6FE57-1BBA-4E71-BDA4-0A1522608FEC@pobox.com> <4E84FF76-444A-48F9-A6F1-837800BCB7C9@apache.org> <867439E1-D87A-4BCC-9732-94C1C6018B72@gmail.com> X-Mailer: Apple Mail (2.930.3) X-Virus-Checked: Checked by ClamAV on apache.org On Feb 7, 2009, at 8:23 PM, Antony Blakey wrote: > > On 08/02/2009, at 11:46 AM, Damien Katz wrote: > >> >> On Feb 7, 2009, at 6:14 PM, Antony Blakey wrote: >> >>> >>> On 08/02/2009, at 9:35 AM, Damien Katz wrote: >>> >>>> I think this works in situations where you have only a single >>>> machine (no replication, no failover), or your app can have read >>>> only slaves nodes where readers don't care about db consistency >>>> (but still no failover). I'm not sure that fits many real world >>>> use cases. >>> >>> If you have read-only slaves, then they won't be inconsistent >>> outside of a replication. This is my current deployment model, >>> with a very large number of users, where every user is potentially >>> running a copy of 'Desktop CouchDB' (cf the contract I posted). >>> This is CouchDB as Notes Client, not as a server per-se. >> >> During replication, you don't get any sort of interdocument >> consistency guarantee or even update ordering. During replication, >> the clients will see random updates until the replication is fully >> complete. If the downstream clients lose their connection halfway >> during an replication, they won't have a consistent database. > > Sure, but this isn't an issue if your app allows for a replication- > mode that is exclusive to normal application mode i.e. doesn't > switch until it gets a completed replication. > > I think the issue you are addressing will only occur if replication > is concurrent with 'normal' operation. For applications the require > consistency, this need not be the case. But if the replication doesn't complete, like in the middle you lose your connection, then the downstream db is in an inconsistent state and will be until you regain the connection and complete the replication. And its not just the downstream dbs that can't be used during active or interrupted replication, it's the central db as well. If you want to update it, you'll have to shut down access while waiting for any in progress replications to complete, then perform the update then reopen replication access. -Damien > > > Antony Blakey > -------------------------- > CTO, Linkuistics Pty Ltd > Ph: 0438 840 787 > > The greatest challenge to any thinker is stating the problem in a > way that will allow a solution > -- Bertrand Russell >