DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=30736>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=30736 [PATCH] to remove synchronized code from TermVectorsReader ------- Additional Comments From [EMAIL PROTECTED] 2004-08-21 19:15 ------- Otis, here is the patch to get rid of synchronized parts in TermVectorsReader. As described in my previous mail, TermVectorReader is cloneable now. In SegmentReader there is still the original TermVectorReader object created,. This object is necessary so that we can close opened streams. All threads get there own local copy, which is a clone from the original and stored within the ThreadLocal. There is also a change in Exception handling. I noticed that IndexReader already throws an IOException in the two getTermFreqVectors(...) methods. In the implementation of the cvs version, TermVectorsReader class catches all exceptions and prints either stacktrace or swallowed it. Exception within TermVecvtorsReader never popped up at the caller. The patch now catches all possible exceptions in TermVectorsReader and is throwing a new IOException which is passed to SegmentReader. The zip attachment includes 5 files: TermVectorsReader.diff SegmentReader.diff TestMultiThreadTermVectors.java -- this is a new junit test to test multithreading TestSegmentReader.diff -- IOException has to be caught TestTermVectorsReader.diff -- adjust to the new behaviour all junit tests passed fine. Although a test indexing 25.000 text files passed. best regards Bernhard --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]