SOLR-4178: ReplicationHandler should abort any current pulls and wait for it's executor to stop during core close.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1421078 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-12-13 05:33:01 +00:00
parent 38d16dc7b7
commit ce0cc401ff
3 changed files with 9 additions and 2 deletions

View File

@ -343,6 +343,9 @@ Bug Fixes
* SOLR-4102: Fix UI javascript error if canonical hostname can not be resolved
(steffkes via hossman)
* SOLR-4178: ReplicationHandler should abort any current pulls and wait for
it's executor to stop during core close. (Mark Miller)
Other Changes
----------------------

View File

@ -150,6 +150,9 @@ public abstract class CachingDirectoryFactory extends DirectoryFactory {
private void close(Directory directory) throws IOException {
synchronized (this) {
if (closed) {
throw new RuntimeException("Already closed");
}
CacheValue cacheValue = byDirectoryCache.get(directory);
if (cacheValue == null) {

View File

@ -71,7 +71,6 @@ import org.apache.http.client.HttpClient;
import org.apache.lucene.index.IndexCommit;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IOContext;
import org.apache.lucene.store.IndexInput;
import org.apache.lucene.store.IndexOutput;
import org.apache.solr.client.solrj.SolrServer;
@ -83,12 +82,12 @@ import org.apache.solr.common.SolrException;
import org.apache.solr.common.params.CommonParams;
import org.apache.solr.common.params.ModifiableSolrParams;
import org.apache.solr.common.params.SolrParams;
import org.apache.solr.common.util.ExecutorUtil;
import org.apache.solr.common.util.FastInputStream;
import org.apache.solr.common.util.NamedList;
import org.apache.solr.core.CachingDirectoryFactory.CloseListener;
import org.apache.solr.core.DirectoryFactory;
import org.apache.solr.core.IndexDeletionPolicyWrapper;
import org.apache.solr.core.NRTCachingDirectoryFactory;
import org.apache.solr.core.SolrCore;
import org.apache.solr.handler.ReplicationHandler.FileInfo;
import org.apache.solr.request.LocalSolrQueryRequest;
@ -1581,6 +1580,8 @@ public class SnapPuller {
public void destroy() {
if (executorService != null) executorService.shutdown();
abortPull();
if (executorService != null) ExecutorUtil.shutdownAndAwaitTermination(executorService);
}
String getMasterUrl() {