mirror of https://github.com/apache/lucene.git
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.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1407817 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b57d801ae3
commit
9eb16eef21
|
@ -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
|
||||
----------------------
|
||||
|
||||
|
|
|
@ -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 extends SolrCoreState implements Recover
|
|||
|
||||
@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) {
|
||||
|
|
Loading…
Reference in New Issue