[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lucene-user
Subject:    Race condition between IndexWriter.commit and IndexWriter.close
From:       Boris Petrov <boris () profuzdigital ! com>
Date:       2018-11-29 10:53:24
Message-ID: 63a9e05c-3a5f-0855-4ba1-b9bb769a8bf0 () profuzdigital ! com
[Download RAW message or body]

Hi all,

We're getting the following exception:

java.lang.IllegalStateException: cannot close: prepareCommit was already
called with no corresponding call to commit
=C2=A0=C2=A0=C2=A0 at org.apache.lucene.index.IndexWriter.shutdown(IndexW=
riter.java:1025)
=C2=A0=C2=A0=C2=A0 at org.apache.lucene.index.IndexWriter.close(IndexWrit=
er.java:1078)
=C2=A0=C2=A0=C2=A0 ...

We are only calling "commit" on IndexWriter. By reading the code I can
see that if you call IndexWriter.commit in parallel to
IndexWriter.close, it is possible to get this exception. More
specifically, after setting "IndexWriter.pendingCommit" on line 4779
(this is using Lucene 7.5.0) and before setting it to "null" on line
4793 this problem could happen.

Is this by design or is it a bug?

Thanks,

Boris Petrov



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic