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

[25/50] lucene-solr:jira/SOLR-8908: LUCENE-7188: remove incorrect sanity check in NRTCachingDirectory.listAll() that throws IllegalStateException

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

Branch: refs/heads/jira/SOLR-8908
Commit: c1a70f31a605ac254c4c5d556444659aaa3201e5
Parents: 10c7757
Author: yonik <yo...@apache.org>
Authored: Mon Apr 11 23:51:41 2016 -0400
Committer: yonik <yo...@apache.org>
Committed: Mon Apr 11 23:51:41 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/c1a70f31/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 6b549f2..e371f25 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -76,6 +76,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/c1a70f31/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);