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:07 UTC

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

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x 5f4af54f9 -> ace13b572


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/ace13b57
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/ace13b57
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/ace13b57

Branch: refs/heads/branch_6x
Commit: ace13b5728df97664ae21e617de9e6ae3706657e
Parents: 5f4af54
Author: yonik <yo...@apache.org>
Authored: Mon Apr 11 23:51:41 2016 -0400
Committer: yonik <yo...@apache.org>
Committed: Mon Apr 11 23:53:59 2016 -0400

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


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ace13b57/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 63a3225..1915377 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -69,6 +69,10 @@ Bug Fixes
 * LUCENE-7187: Block join queries' Weight#extractTerms(...) implementations
   should delegate to the wrapped weight. (Martijn van Groningen)
 
+* LUCENE-7188: remove incorrect sanity check in NRTCachingDirectory.listAll()
+  that led to IllegalStateException being thrown when nothing was wrong.
+  (David Smiley, yonik)  
+
 Other
 
 * LUCENE-7174: Upgrade randomizedtesting to 2.3.4. (Uwe Schindler, Dawid Weiss)

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ace13b57/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 22a9571..9be0b9e 100644
--- a/lucene/core/src/java/org/apache/lucene/store/NRTCachingDirectory.java
+++ b/lucene/core/src/java/org/apache/lucene/store/NRTCachingDirectory.java
@@ -101,10 +101,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);
     }
     String[] result = files.toArray(new String[files.size()]);
     Arrays.sort(result);