lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Kramis" <mkra...@student.ethz.ch>
Subject synchronization problem / bug?
Date Tue, 27 Nov 2001 22:09:57 GMT
hi

while testing the SqlDirectory, I found some really strange thing: scenario
is concurrent writer and searcher:
1. a IndexWriter is started and creates a write.lock until the close method
is called. this cleanly prevents other writers to access the index at the
same time and is ok.
2. go on indexing ...

but now, concurrently, the following process goes on:
1. a Searcher is created with searcher = new IndexSearcher().
2.  this process creates a commit.lock as expected and reads some files.
3. the commit.lock is released. (immediately)
4. now, the querying is done and the hits.doc(i) is read. during this, no
commit.lock is set, but again, some files are accessed (the
InputStream.readInternal method is called).
5. the searcher.close() method is called which closes all open InputStreams.
(no commit.lock released or created)

like that, from time to time, a exception occures because the file has been
changed by the IndexWriter process running the same time.

Any ideas about this? this should also occur with FSDirectory or
RAMDirectory, but more rarely, because these are faster in reading
results...

cheers
marc



--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message