You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2012/07/24 08:19:59 UTC

svn commit: r1364908 - /lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java

Author: uschindler
Date: Tue Jul 24 06:19:59 2012
New Revision: 1364908

URL: http://svn.apache.org/viewvc?rev=1364908&view=rev
Log:
LUCENE-4245: better record interruption

Modified:
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java?rev=1364908&r1=1364907&r2=1364908&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java Tue Jul 24 06:19:59 2012
@@ -870,7 +870,7 @@ public class IndexWriter implements Clos
   }
 
   private void closeInternal(boolean waitForMerges, boolean doFlush) throws IOException {
-    boolean interrupted = Thread.interrupted();
+    boolean interrupted = false;
     try {
 
       if (pendingCommit != null) {
@@ -894,6 +894,7 @@ public class IndexWriter implements Clos
         
       } finally {
         // clean up merge scheduler in all cases, although flushing may have failed:
+        interrupted = Thread.interrupted();
       
         if (waitForMerges) {
           try {