Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 34B7010BB8 for ; Fri, 15 Nov 2013 23:40:38 +0000 (UTC) Received: (qmail 25529 invoked by uid 500); 15 Nov 2013 23:40:36 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 25490 invoked by uid 500); 15 Nov 2013 23:40:36 -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 25482 invoked by uid 99); 15 Nov 2013 23:40:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Nov 2013 23:40:36 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Will.Perry@microsoft.com designates 207.46.163.206 as permitted sender) Received: from [207.46.163.206] (HELO na01-bl2-obe.outbound.protection.outlook.com) (207.46.163.206) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Nov 2013 23:40:30 +0000 Received: from BLUPR03MB150.namprd03.prod.outlook.com (10.255.212.18) by BLUPR03MB149.namprd03.prod.outlook.com (10.255.212.17) with Microsoft SMTP Server (TLS) id 15.0.820.5; Fri, 15 Nov 2013 23:39:49 +0000 Received: from BLUPR03MB150.namprd03.prod.outlook.com ([169.254.3.59]) by BLUPR03MB150.namprd03.prod.outlook.com ([169.254.3.57]) with mapi id 15.00.0820.005; Fri, 15 Nov 2013 23:39:49 +0000 From: Will Perry To: "user@couchdb.apache.org" Subject: RE: view_duplicate_id chaos Thread-Topic: view_duplicate_id chaos Thread-Index: AQHO4kaK1C5TSMnDpE6knS1PQLLxhpomz0YAgAACv0CAAB6XgIAAAqKQ Date: Fri, 15 Nov 2013 23:39:49 +0000 Message-ID: <09599584dbc6446cb33e45313946e61b@BLUPR03MB150.namprd03.prod.outlook.com> References: <9abf6d17bb994256b4e31064499eb87adfe430998c1240bb93756ee7796d6ee6@BLUPR03MB150.namprd03.prod.outlook.com> <4edb711538014126bccbabbb1f11f7fa@BLUPR03MB150.namprd03.prod.outlook.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [2001:4898:80e0:ee43::2] x-forefront-prvs: 0031A0FFAF x-forefront-antispam-report: SFV:NSPM;SFS:(51914003)(24454002)(377454003)(189002)(199002)(13464003)(51704005)(74876001)(77982001)(2656002)(85306002)(81816001)(59766001)(56816003)(77096001)(81342001)(80022001)(65816001)(74706001)(76786001)(63696002)(76796001)(33646001)(79102001)(76576001)(81542001)(87936001)(76482001)(81686001)(74502001)(47446002)(83322001)(74316001)(19580405001)(19580395003)(80976001)(4396001)(50986001)(47976001)(49866001)(47736001)(53806001)(69226001)(74662001)(74366001)(54356001)(46102001)(54316002)(56776001)(31966008)(15975445006)(87266001)(51856001)(83072001)(3826001)(24736002);DIR:OUT;SFP:;SCL:1;SRVR:BLUPR03MB149;H:BLUPR03MB150.namprd03.prod.outlook.com;CLIP:2001:4898:80e0:ee43::2;FPR:;RD:InfoNoRecords;MX:1;A:1;LANG:en; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-Virus-Checked: Checked by ClamAV on apache.org Awesome - thanks for the hint. I'll give this a go over the weekend and let you know how it goes. Cheers, Will -----Original Message----- From: Robert Newson [mailto:rnewson@apache.org]=20 Sent: Friday, November 15, 2013 3:30 PM To: user@couchdb.apache.org Subject: Re: view_duplicate_id chaos This is a bug fixed many releases ago, you need to compact your database, t= hen delete your .view files and rebuild them. The release notes at the time= explained the procedure. I believe this is COUCHDB-968 / COUCHDB-999. https://issues.apache.org/jira/browse/COUCHDB-968 https://issues.apache.org/jira/browse/COUCHDB-999 B. On 15 November 2013 21:44, Will Perry wrote: > I'm wondering how duplicate doc ids could have got there, tho- how is it = even possible for 2 docs to have the same id? Shouldn't the second PUT resu= lt in a 409? > > If the error message is correct (and lets just assume that it is) then=20 > we have duplicate doc ids. While we can delete and rebuild the views,=20 > this takes about 8 hours and isn't something we can afford to be doing=20 > continuously in production :) > > I'd like to try and figure out the root cause for this problem and try to= apply a fix to prevent it occurring again in the future - any pointers? > > Cheers, > > Will > > -----Original Message----- > From: Tim Tisdall [mailto:tisdall@gmail.com] > Sent: Friday, November 15, 2013 1:31 PM > To: user@couchdb.apache.org > Subject: Re: view_duplicate_id chaos > > Do you have duplicate doc ids in your data?? > > I think the view is just corrupted and needs to be deleted and recreated = from scratch. > > -Tim > > On Fri, Nov 15, 2013 at 4:17 PM, Will Perry wr= ote: >> Hi Folks- >> >> In a fairly large DB (~8GB) we're seeing crashes, compaction failures an= d index rebuilds as a result of duplicate doc ids. A selection of related t= races includes: >> >> [error] [<0.2990.111>] Compaction daemon - an error ocurred while=20 >> compacting the view group `System` from database `servicebus`:=20 >> {view_duplicate_id, >> >> <<"test:-vM0xyKZdeSMCIukpTchI3ZeKhk">>} >> >> [error] [<0.7103.113>] Duplicate docid `test:-vM0xyKZdeSMCIukpTchI3ZeKhk= ` detected in view group `_design/System`, database `servicebus` - This vie= w needs to be rebuilt. >> >> >> Can anyone help me understand what's happening here? How can we avoid ge= tting into this situation, and is there a best-practice to resolve it? >> >> Cheers, >> >> Will