Christoph Goller wrote:
Looks like a very good design. The only thing I donīt like is that version
checking and locking in delete() is implementeed twice in SegmentReader and
SegmentsReader. However, I donīt see another solution since multiple inheritence
is not possible in Java and SegmentsReader should definitely extend MultiReader.
Maybe version checking and locking should be implemented in an additional class
used by SegmentReader and SegmentsReader.

Another approach would be to never use SegmentReader alone, but always through a SegmentsReader, so that even an optimized index would use a SegmentsReader. The overhead of a single-segment SegmentsReader is not great, and would probbably never significantly impact performance.


I accidentely stumbled over this one: Shouldnīt we obtain a write lock for setNorm too?

Yes.


If you agree, I could try to do the proposed implementation in the next few days. What do you think?

That would be great!


Thanks for catching these problems,

Doug

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to