From dev-return-2372-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Sun Feb 08 18:56:40 2009 Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 89574 invoked from network); 8 Feb 2009 18:56:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Feb 2009 18:56:40 -0000 Received: (qmail 14003 invoked by uid 500); 8 Feb 2009 18:56:39 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 13972 invoked by uid 500); 8 Feb 2009 18:56:39 -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 13961 invoked by uid 99); 8 Feb 2009 18:56:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Feb 2009 10:56:39 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=FS_REPLICA,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of paul.joseph.davis@gmail.com designates 74.125.46.31 as permitted sender) Received: from [74.125.46.31] (HELO yw-out-2324.google.com) (74.125.46.31) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Feb 2009 18:56:32 +0000 Received: by yw-out-2324.google.com with SMTP id 2so249073ywt.5 for ; Sun, 08 Feb 2009 10:56:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=ihcQoiSPaWJcAVRQEYH/r5KWZeSC8Suh2L4gqXEyqOY=; b=sG6RYWByNWoGLgiaoF1A8fBGH+49YzwliyPKUJGhWBs0Mgvvp1TSTTBrBejjKMI7VA nhkhn694cv8908hLkdGgprg7+J3b6XaXgdfvXLASz3veHOE/vDOGHTvogwbdeburRE43 8kpbMSCYlUxGbMNFGrNmFjQ3nx+C3I54hEopU= 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=m49bc0AODwTtBLpf0y6nbVHODTfC8qJ2wxVM8LTgmWiGw1Ec+iiIMN4vggbfnt92Qx Xi32KDj0EQFP5MMo42Xw92wIQNeh/ic9lHpRjpd02DwTPebu7DttNXhr5viEm2bRUBNU f1yJAeUjwxtGbxbB2CErKye17zib7VYEoRRus= MIME-Version: 1.0 Received: by 10.100.5.15 with SMTP id 15mr2392620ane.50.1234119372047; Sun, 08 Feb 2009 10:56:12 -0800 (PST) In-Reply-To: <2C826622-ECCD-46A8-9BF1-A3B4A140CE02@gmail.com> References: <5B2D5ED2-6B85-41D7-BA78-3DD4BE7AFE13@apache.org> <8286B2B4-4D0F-47CD-8AA6-6CBC872C02CF@apache.org> <7060483c0902080307y6169cc11n393df5be133d133f@mail.gmail.com> <7060483c0902080850w126d4208yd50bb65921c9137d@mail.gmail.com> <7060483c0902080914w1eadaf12h8525e4af53c5aee9@mail.gmail.com> <7060483c0902081038l30df1bd7h1219a7a079a7b00a@mail.gmail.com> <2C826622-ECCD-46A8-9BF1-A3B4A140CE02@gmail.com> Date: Sun, 8 Feb 2009 13:56:12 -0500 Message-ID: Subject: Re: proposed replication rev history changes From: Paul Davis To: dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Sun, Feb 8, 2009 at 1:48 PM, Adam Kocoloski wrote: > > On Feb 8, 2009, at 1:38 PM, Patrick Antivackis wrote: > >> 3) >> NodeA : >> _id : myDoc _rev : 7-moe actual-rev-history [1-bart, 2-lisa, 3-homer, >> 4-marge, 5-patty, 6-selma, 7-moe] damien-rev-history [5-patty, 6-selma, >> 7-moe] patrick-damien-rev-history [1-bart, 6-selma, 7-moe] >> NodeB : >> _id : myDoc _rev : 4-marge actual-rev-history [1-bart, 2-lisa, 3-homer, >> 4-marge] damien-rev-history [ 2-lisa, 3-homer, 4-marge] >> patrick-damien-rev-history [1-bart, 3-homer, 4-marge] >> >> Actual revision system : OK can find there is no conflict, NodeA is just >> up >> to date compare to nodeB >> Damien's proposal : KO comparing [5-patty, 6-selma, 7-moe] with [ 2-lisa, >> 3-homer, 4-marge] >> Keeping first revision combined with Damien's proposal :we compare >> [1-bart, >> 6-selma, 7-moe] with [1-bart, 3-homer, 4-marge], sure it's the same >> document, but with have rev 6 and 7 on NodeA and rev 3 and 4 on NodeB. >> Using >> the replication record on both source and target, we can find than >> revision >> 3 and 4 were already replicated, so for sure rev 6 and 7 coming from NodeA >> are updates of the document. So OK we can find there is no conflict, NodeA >> is just up to date compare to nodeB >> >> >> So compared to Damien's proposal, keeping first revision seems a good idea >> to me. >> >> Do I miss something or am I wrong ? > > The replication records don't include the fact that 3 and 4 made it to Node > B. The replicator consumes the _all_docs_by_seq view, which only stores the > latest revision for each document. The replication history only tracks the > index in that view at the end of each replication, so it knows which > documents have not changed in the interim. Best, > > Adam > > > As Adam points out, you've got a "Then a miracle happens" step with checking that rev's 3 and 4 are the same revisions. This means that the two systems are more or less the same but yours is gonna have added complexity. Also remember that _rev lists aren't actually lists, they're trees. HTH, Paul Davis