You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by yo...@apache.org on 2016/04/12 06:03:21 UTC

lucene-solr:branch_5_5: LUCENE-7188: remove incorrect sanity check in NRTCachingDirectory.listAll() that throws IllegalStateException

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_5_5 09d495d46 -> a49b748b5


LUCENE-7188: remove incorrect sanity check in NRTCachingDirectory.listAll() that throws IllegalStateException


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/a49b748b
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/a49b748b
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/a49b748b

Branch: refs/heads/branch_5_5
Commit: a49b748b58b31af51d06c1d360777d679285e8fd
Parents: 09d495d
Author: yonik <yo...@apache.org>
Authored: Mon Apr 11 23:51:41 2016 -0400
Committer: yonik <yo...@apache.org>
Committed: Mon Apr 11 23:57:44 2016 -0400

----------------------------------------------------------------------
 lucene/CHANGES.txt                                              | 5 +++++
 .../src/java/org/apache/lucene/store/NRTCachingDirectory.java   | 5 +----
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a49b748b/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index e003651..967d88c 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -10,6 +10,11 @@ Bug fixes
 * LUCENE-7112: WeightedSpanTermExtractor.extractUnknownQuery is only called
   on queries that could not be extracted. (Adrien Grand)
 
+* LUCENE-7188: remove incorrect sanity check in NRTCachingDirectory.listAll()
+  that led to IllegalStateException being thrown when nothing was wrong.
+  (David Smiley, yonik)  
+
+
 ======================= Lucene 5.5.0 =======================
 
 New Features

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a49b748b/lucene/core/src/java/org/apache/lucene/store/NRTCachingDirectory.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/store/NRTCachingDirectory.java b/lucene/core/src/java/org/apache/lucene/store/NRTCachingDirectory.java
index 34feff3..918f89a 100644
--- a/lucene/core/src/java/org/apache/lucene/store/NRTCachingDirectory.java
+++ b/lucene/core/src/java/org/apache/lucene/store/NRTCachingDirectory.java
@@ -99,10 +99,7 @@ public class NRTCachingDirectory extends FilterDirectory implements Accountable
       files.add(f);
     }
     for(String f : in.listAll()) {
-      if (!files.add(f)) {
-        throw new IllegalStateException("file: " + in + " appears both in delegate and in cache: " +
-                                        "cache=" + Arrays.toString(cache.listAll()) + ",delegate=" + Arrays.toString(in.listAll()));
-      }
+      files.add(f);
     }
     return files.toArray(new String[files.size()]);
   }