Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 25774 invoked from network); 8 Feb 2009 17:14:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Feb 2009 17:14:31 -0000 Received: (qmail 48212 invoked by uid 500); 8 Feb 2009 17:14:30 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 48161 invoked by uid 500); 8 Feb 2009 17:14:30 -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 48150 invoked by uid 99); 8 Feb 2009 17:14:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Feb 2009 09:14:30 -0800 X-ASF-Spam-Status: No, hits=3.4 required=10.0 tests=FS_REPLICA,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of patrick.antivackis@gmail.com designates 209.85.220.20 as permitted sender) Received: from [209.85.220.20] (HELO mail-fx0-f20.google.com) (209.85.220.20) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Feb 2009 17:14:21 +0000 Received: by fxm13 with SMTP id 13so2355002fxm.11 for ; Sun, 08 Feb 2009 09:14:01 -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; bh=oiP2O8/QLczy8kl30Nak5NonmRNHwfU2FHVRrx8evDU=; b=vJ/muV8s4pUe66a2dODTm7imTWqV6YwT9ZzG/5JJpYU5wX4nnLmIUZpVRZrkgzKkr8 m/1PzCLEJb8ZohpqxYDl5GgvzlQqYrbON+dPNZ4uwFdi9trtrMrfxYO3rlTUI/2DKRt7 6cu44FaIbu/7ECCx44McOyjgGucfYU61ZLS+k= 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; b=WDC8kZoB+fMbL3ef3o1+RI93nxE7pk4z0tbJkjsCYjo781o/66oQzN0LjRY96McDt+ zqnkyX3LRvCR2t+aCHz/9tJD9tMjYlLyVW2M/y5P8RB9uLbazCGW/PG0WDlYP0Q0MPqY T++lanq/h8nlsQbCLFWRfZZAL+gUxsqhEmoSQ= MIME-Version: 1.0 Received: by 10.223.112.201 with SMTP id x9mr1707249fap.69.1234113241222; Sun, 08 Feb 2009 09:14:01 -0800 (PST) In-Reply-To: References: <5B2D5ED2-6B85-41D7-BA78-3DD4BE7AFE13@apache.org> <7060483c0902071559m1421b3bewb4bc6396124cb969@mail.gmail.com> <8286B2B4-4D0F-47CD-8AA6-6CBC872C02CF@apache.org> <7060483c0902080307y6169cc11n393df5be133d133f@mail.gmail.com> <7060483c0902080850w126d4208yd50bb65921c9137d@mail.gmail.com> Date: Sun, 8 Feb 2009 18:14:01 +0100 Message-ID: <7060483c0902080914w1eadaf12h8525e4af53c5aee9@mail.gmail.com> Subject: Re: proposed replication rev history changes From: Patrick Antivackis To: dev@couchdb.apache.org Content-Type: multipart/alternative; boundary=001636c5b31a5b0e3e04626b619c X-Virus-Checked: Checked by ClamAV on apache.org --001636c5b31a5b0e3e04626b619c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit And what today's revision system help in such a case ? 2009/2/8 Paul Davis > On Sun, Feb 8, 2009 at 11:50 AM, Patrick Antivackis > wrote: > > I'm not sure I understood what you asked. > > > > It would be a conflict of document, that would need either manual > correction > > or why not an automatic correction applying a move to one of the > document, > > but at least couch can tell for sure it was not the same document at the > > origin. > > > > What I not understand is what today's revision system or proposed > revision > > system will bring more for this kind of conflict with two different > > documents are created with same Id on two different nodes ? Except that > with > > the new revision proposal, you don't know for sure it was same or > different > > document at the origin if replications occurs after you trimmed the > > reference to the first revision. > > > > I'm saying that your suggestion to always retain the first revision is > going to run into problems when a document is created on two machines > and thus has to initial revisions. Or rather, it will run into the > same problems as Damien's proposal yet have the added complexity that > we now have the special cased 'first revisions' info. > > Unless of course I'm missing something else in the details. > > > > > > > > > 2009/2/8 Paul Davis > > > >> On Sun, Feb 8, 2009 at 6:07 AM, Patrick Antivackis > >> wrote: > >> > 2009/2/8 Damien Katz > >> > > >> >> You got everything right except this. It doesn't solve the problem, > >> because > >> >> on another node, I could have a document that looked like ["1-foo" > >> "2-bif"]. > >> >> That is a real edit conflict that wouldn't be caught by what I think > you > >> are > >> >> proposing. > >> >> > >> > > >> > That's right, there is a real edit conflict, but at least couchdb can > >> > detect it based on the first revision reference that is always kept. > >> > If you not keep the reference of the first revision you can arrive to > : > >> > BaseA : ["1-foo"] > >> > BaseB : empty > >> > Replication : > >> > BaseA : ["1-foo"] > >> > BaseB : ["1-foo"] > >> > Life goes on : > >> > BaseA : ["1-foo" "2-bar" "3-baz" "4-biz"] but as it's trimmed to 3 you > >> only > >> > keep ["2-bar" "3-baz" "4-biz"] > >> > BaseB : ["1-foo" "2-bad" "3-baf" "4-bif"] but as it's trimmed to 3 you > >> only > >> > keep ["2-bad" "3-baf" "4-bif"] > >> > New replication : > >> > ????? same Id but no common revision, what we do ? And couch can not > even > >> > help to say if it was same doc or not at the origin. > >> > > >> > >> Patrick, > >> > >> I'm pretty sure i see where you're coming from, but can you explain > >> what would happen if the same document ID were created on two servers? > >> Each server would have a different 'first rev' so who's first rev > >> would be carried on in the future? > >> > >> > This is used during conflict detection to figure out if 2 tree > fragments > >> >> overlap. We don't actually store a sequential number for each > revision, > >> we > >> >> store a revision tree of numbers, with the root of the tree being the > >> offset > >> >> from 0 where it was trimmed (technically it's stemmed). > >> >> > >> > > >> > You are right, keep trace of the numbrer of the revision is indeed > >> important > >> > especially when a same origin document in updated on different > nodes.But > >> > couldn't it be replace bu a timestamp, this is sequential too and give > >> even > >> > more information. > >> > > >> > > >> >> Sometimes people can deal with spurious conflicts. This gives you the > >> >> option. If you don't want spurious conflicts, don't use this feature. > >> >> > >> >> And if you want the same document to be editted over and over, 100s > of > >> >> thousands of times, this is really the only option. The revision > history > >> >> will get too big and slow down updates tremendously. > >> >> > >> >> Sure but I would say it's different use cases. Record management for > >> > examples needs to keep track of changes during a period of time. And > in > >> all > >> > CMS/ECM i have worked on, clean up of version is done on time base > more > >> than > >> > on number of revision having occured. > >> > > >> > >> HTH, > >> Paul Davis > >> > > > --001636c5b31a5b0e3e04626b619c--