Apache Lucene open-source search software
fix FieldCache holding hard ref to readers: LUCENE-754
Yonik Seeleyf4b3239092b2
diff --git a/CHANGES.txt b/CHANGES.txtindex 65920ef30ea..3803eac944a 100644--- a/CHANGES.txt+++ b/CHANGES.txt@@ -253,6 +253,11 @@ Bug fixes{super.finalize();}" to make sure we don't miss finalizers inclasses above us. (Esmond Pitt via Mike McCandless)+28. LUCENE-754: Fix a problem introduced by LUCENE-651, causing+ IndexReaders to hang around forever, in addition to not+ fixing the original FieldCache performance problem.+ (Chris Hostetter, Yonik Seeley)+Optimizations1. LUCENE-586: TermDocs.skipTo() is now more efficient fordiff --git a/src/java/org/apache/lucene/search/FieldCacheImpl.java b/src/java/org/apache/lucene/search/FieldCacheImpl.javaindex bafa0d39864..1ca0222cc12 100644--- a/src/java/org/apache/lucene/search/FieldCacheImpl.java+++ b/src/java/org/apache/lucene/search/FieldCacheImpl.java@@ -62,7 +62,7 @@ implements FieldCache {}if (value == null) {value = new CreationPlaceholder();- innerCache.put(reader, value);+ innerCache.put(key, value);}}if (value instanceof CreationPlaceholder) {