lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1682697 - in /lucene/dev/branches/lucene6508/lucene: core/src/java/org/apache/lucene/store/LockValidatingDirectoryWrapper.java test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java
Date Sun, 31 May 2015 08:41:46 GMT
Author: mikemccand
Date: Sun May 31 08:41:45 2015
New Revision: 1682697

URL: http://svn.apache.org/r1682697
Log:
LUCENE-6508: also verify lock on fsync

Modified:
    lucene/dev/branches/lucene6508/lucene/core/src/java/org/apache/lucene/store/LockValidatingDirectoryWrapper.java
    lucene/dev/branches/lucene6508/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java

Modified: lucene/dev/branches/lucene6508/lucene/core/src/java/org/apache/lucene/store/LockValidatingDirectoryWrapper.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6508/lucene/core/src/java/org/apache/lucene/store/LockValidatingDirectoryWrapper.java?rev=1682697&r1=1682696&r2=1682697&view=diff
==============================================================================
--- lucene/dev/branches/lucene6508/lucene/core/src/java/org/apache/lucene/store/LockValidatingDirectoryWrapper.java
(original)
+++ lucene/dev/branches/lucene6508/lucene/core/src/java/org/apache/lucene/store/LockValidatingDirectoryWrapper.java
Sun May 31 08:41:45 2015
@@ -18,6 +18,7 @@ package org.apache.lucene.store;
  */
 
 import java.io.IOException;
+import java.util.Collection;
 
 /** 
  * This class makes a best-effort check that a provided {@link Lock}
@@ -54,4 +55,10 @@ public final class LockValidatingDirecto
     writeLock.ensureValid();
     in.renameFile(source, dest);
   }
-}
\ No newline at end of file
+
+  @Override
+  public void sync(Collection<String> names) throws IOException {
+    writeLock.ensureValid();
+    in.sync(names);
+  }
+}

Modified: lucene/dev/branches/lucene6508/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6508/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java?rev=1682697&r1=1682696&r2=1682697&view=diff
==============================================================================
--- lucene/dev/branches/lucene6508/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java
(original)
+++ lucene/dev/branches/lucene6508/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java
Sun May 31 08:41:45 2015
@@ -734,6 +734,7 @@ public class MockDirectoryWrapper extend
         // super() does not throw IOException currently:
         throw new RuntimeException("MockDirectoryWrapper: cannot close: there are still open
files: " + openFiles, cause);
       }
+      System.out.println("MDW close: " + openLocks);
       if (openLocks.size() > 0) {
         Exception cause = null;
         Iterator<RuntimeException> stacktraces = openLocks.values().iterator();



Mime
View raw message