mirror of https://github.com/apache/lucene.git
Fix one more insanity case... die,die,die!
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1296914 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ff27ca3738
commit
4b31375b55
|
@ -1387,7 +1387,7 @@ public abstract class LuceneTestCase extends Assert {
|
||||||
r = SlowCompositeReaderWrapper.wrap(r);
|
r = SlowCompositeReaderWrapper.wrap(r);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
// will create no FC insanity as Parallel*Reader has own cache key:
|
// will create no FC insanity in atomic case, as ParallelAtomicReader has own cache key:
|
||||||
r = (r instanceof AtomicReader) ?
|
r = (r instanceof AtomicReader) ?
|
||||||
new ParallelAtomicReader((AtomicReader) r) :
|
new ParallelAtomicReader((AtomicReader) r) :
|
||||||
new ParallelCompositeReader((CompositeReader) r);
|
new ParallelCompositeReader((CompositeReader) r);
|
||||||
|
@ -1419,6 +1419,9 @@ public abstract class LuceneTestCase extends Assert {
|
||||||
}
|
}
|
||||||
if (wasOriginallyAtomic) {
|
if (wasOriginallyAtomic) {
|
||||||
r = SlowCompositeReaderWrapper.wrap(r);
|
r = SlowCompositeReaderWrapper.wrap(r);
|
||||||
|
} else if ((r instanceof CompositeReader) && !(r instanceof FCInvisibleMultiReader)) {
|
||||||
|
// prevent cache insanity caused by e.g. ParallelCompositeReader, to fix we wrap one more time:
|
||||||
|
r = new FCInvisibleMultiReader(r);
|
||||||
}
|
}
|
||||||
if (VERBOSE) {
|
if (VERBOSE) {
|
||||||
System.out.println("maybeWrapReader wrapped: " +r);
|
System.out.println("maybeWrapReader wrapped: " +r);
|
||||||
|
|
Loading…
Reference in New Issue