couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <robert.new...@gmail.com>
Subject Re: couchdb-lucene reindexes when restarted
Date Wed, 14 Apr 2010 12:38:36 GMT
I'd like the debug level output but I'm no longer so sure I understand
the cause.

the update_seq is calculated only from reachable indexes (I read all
views in all ddocs). so it'll be a bug in that rather than what I said
earlier, I think.

Seeing the debug line where 'since' drops to the lower number will
tell me a lot.

B.

On Wed, Apr 14, 2010 at 1:29 PM, Manokaran K <manokaran@gmail.com> wrote:
> On Wed, Apr 14, 2010 at 5:49 PM, Robert Newson <robert.newson@gmail.com>wrote:
>
>> Ok, I think I understand this now.
>>
>> When you start couchdb-lucene on a database for the first time (and
>> after a restart), it looks at the update_seq of all the Lucene indexes
>> it has on disk and takes the lowest number of these. It then uses that
>> in a call to _changes?since=N.
>>
>> My suspicion is you have an index that is no longer reachable (because
>> you've changed your index function at some point). This index won't be
>> updated, so it's stuck at 27200.
>>
>> I've pushed an update that will log (at DEBUG level, so change
>> log4j.xml temporarily) how the 'since' value is calculated. It would
>> be very helpful if you could verify my hypothesis.
>>
>> You can fix this, if I'm right, by running _cleanup (check the README
>> for the syntax) which will delete the unreachable index. I need to
>> make a real fix, though; namely, the update_seq calculation should
>> ignore unreachable indexes.
>>
>>
> Your hypothesis is likely. A couple of days back, I was getting some doc ids
> as response to some query but the doc was not available in couchdb. Most
> likely c-l returned some doc ids that it had indexed earlier but since I
> drop and recreate the db in couchdb during development, c-l did not know
> about it! But I was not able to recreate this problem.
>
> Will use the latest build and update you.
>
> thanks,
> mano
>

Mime
View raw message