lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <>
Subject [jira] Commented: (LUCENE-1385) IndexReader.isIndexCurrent()==false -> IndexReader.reopen() -> still index not current
Date Sun, 21 Sep 2008 17:31:44 GMT


Uwe Schindler commented on LUCENE-1385:

I hit the bug yersterday again. Here the log from the reopen() with some comments:

2008-09-20 06:09:19,354 INFO - Reopening index

Here the function reopen() is called:

2008-09-20 06:09:19,354 DEBUG
- isCurrent(): indexVersion=1220348528579 myVersion=1220348528578
2008-09-20 06:09:19,355 DEBUG
- reopen(): do reopen this=org.apache.lucene.index.SegmentReader@44036e4e
2008-09-20 06:09:19,355 DEBUG
- reopen(): segmentsFile=segments_19 version=1220348528579
2008-09-20 06:09:19,355 DEBUG
- reopen(): did not get new reader

Here I test, if Index is current after the reopen():

2008-09-20 06:09:19,355 DEBUG
- isCurrent(): indexVersion=1220348528579 myVersion=1220348528578
2008-09-20 06:09:19,355 WARN de.pangaea.metadataportal.config.SingleIndexConfig - Index 'datasets-pangaea-iodp'
was reopened but is still not up-to-date (maybe a bug in Lucene, we try to investigate this).
Doing a hard reopen (close & open later).

> IndexReader.isIndexCurrent()==false -> IndexReader.reopen() -> still index not
> --------------------------------------------------------------------------------------
>                 Key: LUCENE-1385
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>    Affects Versions: 2.3.2
>         Environment: Linux, Solaris, Windows XP
>            Reporter: Uwe Schindler
>         Attachments: LUCENE-1385.patch
> I found a strange error occurring with IndexReader.reopen. It is not always reproduceable,
it only happens sometimes, but strangely on all my computers with different platforms at the
same time. Maybe has something to to with the timestamp used in index versions.
> I have a search server using an IndexReader, that is openend in webapp startup and should
stay open. Every half an hour this web application checks, if the index is still current using
IndexReader.isCurrent(). When a parallel job that indexes documents (in another virtual machine)
and modifies the indexes, isCurrent() return TRUE. The half-hourly cron-job then uses IndexReader.reopen()
to reopen the index. But sometimes, directly after reopen() the Index is still not current
(and no updates occur). Again calling reopen does not change it, too. Searching on the index
shows all new/updated documents, but isCurrent() still return false. The problem with this
is, that now the index is reopened all the time, because the detection of a current index
does not work any more.
> I have now a workaround in my code to handle this: After calling IndexReader.reopen(),
I test for IndexReader.isCurrent(), and if not, I close it hard and open a new instance.
> Most times IndexReader.reopen works correct, but sometimes this error occurs. Looking
into the code of reopen(), I realized, that there is some extra check, if the Index has modifications,
and if yes the reopen call returns the original reader (this maybe the problem I have). But
the IndexReader is only used for searching, no updates occur.
> My questions: Why is there this check for modifications in reopen()? Why does this happen
only at certain times on all my servers with different platforms?
> I want to use reopen, because in future, when the new FieldCache will be reopen-aware
and does not everytime rebuild the full cache, it will be very important, to have this fixed.
At the moment, I have no problem with the case, that reopen may fail and I have to do a rough

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message