couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <rnew...@apache.org>
Subject Re: view_duplicated_id on CouchDB 1.2
Date Wed, 18 Apr 2012 08:42:48 GMT
Stefan,

The database in question, was it ever used on a release earlier than 1.2.0?

B.

On 18 April 2012 09:37, Robert Newson <rnewson@apache.org> wrote:
> 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 <cgsmcmlxxv@gmail.com> 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 problem
>> 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 one
>> (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 building
>> a view). I might be wrong though and even if you were able to do that, you
>> would run into the same problem unless you monitor closely your disk space.
>>
>> I hope this answer will help you solving your problem. If my suggestion is
>> not what you are looking for, please, ignore it.
>>
>> CGS
>>
>>
>>
>>
>>
>>
>> On Wed, Apr 18, 2012 at 8:52 AM, Stefan Kögl <koeglstefan@gmail.com> wrote:
>>
>>> 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
>>>

Mime
View raw message