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 519FD91B6 for ; Wed, 18 Apr 2012 08:37:17 +0000 (UTC) Received: (qmail 58694 invoked by uid 500); 18 Apr 2012 08:37:15 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 58632 invoked by uid 500); 18 Apr 2012 08:37:15 -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 58614 invoked by uid 99); 18 Apr 2012 08:37:15 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Apr 2012 08:37:15 +0000 Received: from localhost (HELO mail-iy0-f180.google.com) (127.0.0.1) (smtp-auth username rnewson, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Apr 2012 08:37:14 +0000 Received: by iage36 with SMTP id e36so13882805iag.11 for ; Wed, 18 Apr 2012 01:37:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.42.164 with SMTP id p4mr12231960igl.72.1334738234196; Wed, 18 Apr 2012 01:37:14 -0700 (PDT) Received: by 10.42.240.135 with HTTP; Wed, 18 Apr 2012 01:37:14 -0700 (PDT) In-Reply-To: References: Date: Wed, 18 Apr 2012 09:37:14 +0100 Message-ID: Subject: Re: view_duplicated_id on CouchDB 1.2 From: Robert Newson To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Stefan, The first step is to ensure that your database does not contain duplicates. To do this, you need to compact it in a special way. Create a 0 byte dbname.compact file in the same place that the normal .compact file would be, and then compact. This will force the retry mode of the compactor which will more aggressively check for duplicates. Once that is done, you can rebuild the view. If you can tolerate the absence of the view, since disk space is a premium, you could delete the view first. Simply remove the "views" from your ddoc, save it, run _view_cleanup to delete all the old files, re-add it, and then query your view again. If you have modified the view a few times, you might find that _view_cleanup frees enough space to avoid those steps. B. On 18 April 2012 09:19, CGS wrote: > Hi Stephan, > > If I understood your problem correctly, you don't know if you will have > enough resources to build your view, so, you will run into the same probl= em > even if you rebuild your view from scratch. My solution to this problem > would be to split the database in several pieces and to create views for > each of them. In such way, you will build your views in parallel and if o= ne > (or more) will fail due to the lack of space, you won't lose everything. > The drawback of such a solution is that you will have to write a code to > combine the views when the full process is done. > > To answer your direct question, to my knowledge, you cannot avoid > rebuilding your view (that is, you cannot stop and continue later buildin= g > a view). I might be wrong though and even if you were able to do that, yo= u > would run into the same problem unless you monitor closely your disk spac= e. > > I hope this answer will help you solving your problem. If my suggestion i= s > not what you are looking for, please, ignore it. > > CGS > > > > > > > On Wed, Apr 18, 2012 at 8:52 AM, Stefan K=F6gl wr= ote: > >> Hi, >> >> Compaction of one of my views stopped with the following error >> {"error":"view_duplicated_id","reason":"8c40fc1a160920a958b95e8d111aabb0= "} >> (full log at https://friendpaste.com/6n5skP4QKfAGZNGMcYPHAR). The view >> and underlying database have been built and compacted with CouchDB >> 1.2. >> >> As discussed with dch in IRC yesterday, I'm trying to fix the problem >> temporarily by making a whitespace change to one of the views in the >> group (to change its sig), upload it with another name and index it. >> After it is built, I'll copy it over the broken view. However the view >> rebuild takes a few days and I'm afraid I will run out of disk space >> in the meantime because of the growing view. Is there any other way to >> get rid of the duplicate in the view? >> >> >> Thanks, >> >> Stefan >>