lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <>
Subject RE: svn commit: r1363272 - /lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/util/
Date Mon, 23 Jul 2012 09:42:20 GMT

If you use a plain SlowCompositeReaderWrapper without an FCInvisible wrapper on the MultiReader
behind, the FC insanity checker will warn the user! So
FieldCache.DEFAULT.getInts(SlowCompositeReaderWrapper.wrap(directoryReader), field) will create
insanity and the detector will find that. The reason for this is, because SlowCompositeReader
returns the cache key of the directoryReader it wraps, so the insanity checker sees the child
readers and shout "ALARM!". We just "hide" the composite reader key, so the random wrapping
causes no insanity, because the atomic reader wrapper looks really atomic to the insanity


Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen

> -----Original Message-----
> From: [] On
> Behalf Of Martijn v Groningen
> Sent: Monday, July 23, 2012 10:44 AM
> To:
> Subject: Re: svn commit: r1363272 - /lucene/dev/trunk/lucene/test-
> framework/src/java/org/apache/lucene/util/
> > That is wanted! We want to test SlowMultiReaderWrapper and verify that it
> really behaves like a full conformant AtomicReader. Because of that we
> sometimes war with it. The fix Robert did is fine and is identical to the one we
> did in the past. As this is no real Lucene usage pattern, not detecting the
> obvious cache violation is wanted here.
> Ok. I was just wondering about the fact that a toplevel readercontext is given as
> argument to Collector#setNextReader(). It confused me, but as you said it is no
> real Lucene usage pattern.
> >
> > For incorrect Lucene usage (like getting a field cache entry on a slow
> wrapper), we can still warn the user. Buf for tests this insanity is wanted by the
> wrapping.
> I think the SlowCompositeReaderWrapper jdocs warns the user already enough,
> so that is fine for now.
> Martijn
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: For additional
> commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message