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: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
|