Skip to content

Apache Lucene open-source search software

merge master

Mike McCandless9cf74f791c23
diff --cc lucene/core/src/java/org/apache/lucene/store/FSDirectory.java
index da69acae08b,400ad5d0e61..14bb7afba22
--- a/lucene/core/src/java/org/apache/lucene/store/FSDirectory.java
+++ b/lucene/core/src/java/org/apache/lucene/store/FSDirectory.java
@@@ -269,13 -245,6 +269,12 @@@ public abstract class FSDirectory exten
}
}
+ protected void ensureCanRead(String name) throws IOException {
- maybeDeletePendingFiles();
+ if (pendingDeletes.contains(name)) {
+ throw new NoSuchFileException("file \"" + name + "\" is pending delete and cannot be opened for read");
+ }
+ }
+
@Override
public void sync(Collection<String> names) throws IOException {
ensureOpen();