mirror of
https://github.com/apache/lucene.git
synced 2025-03-08 01:25:19 +00:00
SOLR-4604: UpdateLog#init is over called on SolrCore#reload
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1457646 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f33c2917e3
commit
5f618b8000
@ -157,8 +157,7 @@ Bug Fixes
|
||||
* SOLR-4601: A Collection that is only partially created and then deleted will
|
||||
leave pre allocated shard information in ZooKeeper. (Mark Miller)
|
||||
|
||||
* SOLR-4604: SolrCore is not using the UpdateHandler that is passed to it in
|
||||
SolrCore#reload. (Mark Miller)
|
||||
* SOLR-4604: UpdateLog#init is over called on SolrCore#reload. (Mark Miller)
|
||||
|
||||
Optimizations
|
||||
----------------------
|
||||
|
@ -804,7 +804,9 @@ public final class SolrCore implements SolrInfoMBean {
|
||||
this.updateHandler = createUpdateHandler(updateHandlerClass == null ? DirectUpdateHandler2.class
|
||||
.getName() : updateHandlerClass);
|
||||
} else {
|
||||
this.updateHandler = updateHandler;
|
||||
this.updateHandler = createUpdateHandler(
|
||||
updateHandlerClass == null ? DirectUpdateHandler2.class.getName()
|
||||
: updateHandlerClass, updateHandler);
|
||||
}
|
||||
infoRegistry.put("updateHandler", this.updateHandler);
|
||||
|
||||
|
@ -110,7 +110,7 @@ public class DirectUpdateHandler2 extends UpdateHandler implements SolrCoreState
|
||||
}
|
||||
|
||||
public DirectUpdateHandler2(SolrCore core, UpdateHandler updateHandler) {
|
||||
super(core);
|
||||
super(core, updateHandler.getUpdateLog());
|
||||
solrCoreState = core.getSolrCoreState();
|
||||
|
||||
UpdateHandlerInfo updateHandlerInfo = core.getSolrConfig()
|
||||
|
@ -122,6 +122,10 @@ public abstract class UpdateHandler implements SolrInfoMBean {
|
||||
}
|
||||
|
||||
public UpdateHandler(SolrCore core) {
|
||||
this(core, null);
|
||||
}
|
||||
|
||||
public UpdateHandler(SolrCore core, UpdateLog updateLog) {
|
||||
this.core=core;
|
||||
schema = core.getSchema();
|
||||
idField = schema.getUniqueKeyField();
|
||||
@ -131,7 +135,11 @@ public abstract class UpdateHandler implements SolrInfoMBean {
|
||||
if (!core.isReloaded() && !core.getDirectoryFactory().isPersistent()) {
|
||||
clearLog(ulogPluginInfo);
|
||||
}
|
||||
initLog(ulogPluginInfo);
|
||||
if (updateLog == null) {
|
||||
initLog(ulogPluginInfo);
|
||||
} else {
|
||||
this.ulog = updateLog;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user