lucene-dev mailing list archives

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

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
checker.

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: martijn.is.hier@gmail.com [mailto:martijn.is.hier@gmail.com] On
> Behalf Of Martijn v Groningen
> Sent: Monday, July 23, 2012 10:44 AM
> To: dev@lucene.apache.org
> Subject: Re: svn commit: r1363272 - /lucene/dev/trunk/lucene/test-
> framework/src/java/org/apache/lucene/util/LuceneTestCase.java
> 
> > 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: dev-unsubscribe@lucene.apache.org For additional
> commands, e-mail: dev-help@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message