Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 14337 invoked from network); 2 Feb 2010 19:48:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Feb 2010 19:48:49 -0000 Received: (qmail 79899 invoked by uid 500); 2 Feb 2010 19:48:48 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 79816 invoked by uid 500); 2 Feb 2010 19:48:48 -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 79806 invoked by uid 99); 2 Feb 2010 19:48:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 19:48:48 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of randall.leeds@gmail.com designates 209.85.218.209 as permitted sender) Received: from [209.85.218.209] (HELO mail-bw0-f209.google.com) (209.85.218.209) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 19:48:41 +0000 Received: by bwz1 with SMTP id 1so643356bwz.32 for ; Tue, 02 Feb 2010 11:48:20 -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=YR6KulR5kLCPxKUvrJBkaMYXZnMtZGaAQyDMNi5UfWM=; b=JdC6s25QPxP/pPoIlcWD2AhXNel/un3x9gbtUZUAz1ZwuiSxZ2o3BZyhSK9ie7SOyX gRZUchmxleJaqxll/lv297m61ptTGweW562UQubAapZyoU9E+z7nIGuyx43L8VsZHcns V6s7tYRLtx51C5p3sEFBx7x+HBI2js2rK8VAk= 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=ebx1LJ3Ro3liyzQ/LBqA8cRy20GpI2CG0U8CqvDo+14D47L6S3RpgxJlL7ieNlSezo TNKit6yGIPcZj73f7aPTTKcd+KtYouDeBWbB9lV3ae6hPq+R5zbuiFyJdrd2EnNs5MR1 aCUJt6WtwlZNgntVnT7zdFVV2PV0bHxTpyzC4= MIME-Version: 1.0 Received: by 10.204.8.154 with SMTP id h26mr4584967bkh.113.1265140100468; Tue, 02 Feb 2010 11:48:20 -0800 (PST) In-Reply-To: References: <55047b711002012202j1878120epfb6a34629fcb812b@mail.gmail.com> Date: Tue, 2 Feb 2010 11:48:19 -0800 Message-ID: Subject: Re: associating UUIDs to DBs From: Randall Leeds To: dev@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 On Tue, Feb 2, 2010 at 11:39, Chris Anderson wrote: > On Tue, Feb 2, 2010 at 11:25 AM, Randall Leeds wrote: >> I'm not entirely happy with this patch and I'd like some help figuring >> out what to do about it. >> >> I foresee problems when database files are copied or backed up on >> disk. It's possible to end up with two couchdb instances hosting >> databases with the same uuid. The problem is that the uuid is no >> longer meaningful, as it doesn't do what it was intended to (uniquely >> identify the database). >> >> Can anyone see a way around this? >> > > I think we don't mind this. As I mentioned above, when we see that 2 > db files have the same uuid we can do a fast-forward replication by > starting from the lower of the 2 dbs sequence #s for replication. > (maybe... Adam, does this sound sane?) If changes had been made to both dbs separately then the lower sequence # might be beyond the sequence number at which the histories diverged and the changes to the "younger" db would be lost.