lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sar...@apache.org
Subject lucene-solr:branch_6_0: LUCENE-7188: remove incorrect sanity check in NRTCachingDirectory.listAll() that throws IllegalStateException
Date Thu, 19 May 2016 15:36:36 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6_0 7b81d5662 -> b31c39812


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

Branch: refs/heads/branch_6_0
Commit: b31c39812ec0e6017afe20568bb21d44aef2fa78
Parents: 7b81d56
Author: yonik <yonik@apache.org>
Authored: Mon Apr 11 23:51:41 2016 -0400
Committer: Steve Rowe <sarowe@apache.org>
Committed: Thu May 19 11:35:40 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/b31c3981/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 79a759f..0d948f6 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -24,6 +24,10 @@ Bug Fixes
 * LUCENE-7279: JapaneseTokenizer throws ArrayIndexOutOfBoundsException
   on some valid inputs (Mike McCandless)
 
+* LUCENE-7188: remove incorrect sanity check in NRTCachingDirectory.listAll()
+  that led to IllegalStateException being thrown when nothing was wrong.
+  (David Smiley, yonik)
+
 ======================= Lucene 6.0.0 =======================
 
 System Requirements

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b31c3981/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);


Mime
View raw message