mirror of https://github.com/apache/lucene.git
SOLR-6793: ReplicationHandler does not destroy all of it's created SnapPullers.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1650764 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
969dcdb43c
commit
8213fe8a0a
|
@ -415,6 +415,9 @@ Bug Fixes
|
|||
* SOLR-6839: Direct routing with CloudSolrServer will ignore the Overwrite document option.
|
||||
(Mark Miller)
|
||||
|
||||
* SOLR-6793: ReplicationHandler does not destroy all of it's created SnapPullers.
|
||||
(Mark Miller)
|
||||
|
||||
Optimizations
|
||||
----------------------
|
||||
|
||||
|
|
|
@ -329,11 +329,16 @@ public class ReplicationHandler extends RequestHandlerBase implements SolrCoreAw
|
|||
if (!snapPullLock.tryLock())
|
||||
return false;
|
||||
try {
|
||||
tempSnapPuller = snapPuller;
|
||||
if (masterUrl != null) {
|
||||
if (tempSnapPuller != null && tempSnapPuller != snapPuller) {
|
||||
tempSnapPuller.destroy();
|
||||
}
|
||||
|
||||
NamedList<Object> nl = solrParams.toNamedList();
|
||||
nl.remove(SnapPuller.POLL_INTERVAL);
|
||||
tempSnapPuller = new SnapPuller(nl, this, core);
|
||||
} else {
|
||||
tempSnapPuller = snapPuller;
|
||||
}
|
||||
return tempSnapPuller.fetchLatestIndex(core, forceReplication);
|
||||
} catch (Exception e) {
|
||||
|
@ -1001,6 +1006,9 @@ public class ReplicationHandler extends RequestHandlerBase implements SolrCoreAw
|
|||
if (snapPuller != null) {
|
||||
snapPuller.destroy();
|
||||
}
|
||||
if (tempSnapPuller != null && tempSnapPuller != snapPuller) {
|
||||
tempSnapPuller.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue