lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r1407817 - in /lucene/dev/trunk/solr: CHANGES.txt core/src/java/org/apache/solr/update/DefaultSolrCoreState.java
Date Sat, 10 Nov 2012 14:11:06 GMT
Author: markrmiller
Date: Sat Nov 10 14:11:05 2012
New Revision: 1407817

URL: http://svn.apache.org/viewvc?rev=1407817&view=rev
Log:
SOLR-4060: ReplicationHandler can try and do a snappull and open a new IndexWriter after shutdown
has already occurred, leaving an IndexWriter that is not closed.

Modified:
    lucene/dev/trunk/solr/CHANGES.txt
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java

Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1407817&r1=1407816&r2=1407817&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Sat Nov 10 14:11:05 2012
@@ -152,6 +152,10 @@ Bug Fixes
 * SOLR-4031: Upgrade to Jetty 8.1.7 to fix a bug where in very rare occasions 
   the content of two concurrent requests get mixed up. (Per Steffensen, yonik)
 
+* SOLR-4060: ReplicationHandler can try and do a snappull and open a new IndexWriter
+  after shutdown has already occurred, leaving an IndexWriter that is not closed.
+  (Mark Miller)
+
 Other Changes
 ----------------------
 

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java?rev=1407817&r1=1407816&r2=1407817&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java Sat
Nov 10 14:11:05 2012
@@ -20,6 +20,7 @@ package org.apache.solr.update;
 import java.io.IOException;
 
 import org.apache.lucene.index.IndexWriter;
+import org.apache.lucene.store.AlreadyClosedException;
 import org.apache.solr.cloud.RecoveryStrategy;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.core.CoreContainer;
@@ -114,6 +115,9 @@ public final class DefaultSolrCoreState 
 
   @Override
   public synchronized void newIndexWriter(SolrCore core, boolean rollback, boolean forceNewDir)
throws IOException {
+    if (closed) {
+      throw new AlreadyClosedException("SolrCoreState already closed");
+    }
     log.info("Creating new IndexWriter...");
     String coreName = core.getName();
     synchronized (writerPauseLock) {



Mime
View raw message