mirror of https://github.com/apache/lucene.git
straighten out some whacky code
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@906086 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
58bbab2827
commit
1444299662
|
@ -278,14 +278,15 @@ public class ReplicationHandler extends RequestHandlerBase implements SolrCoreAw
|
|||
try {
|
||||
IndexDeletionPolicyWrapper delPolicy = core.getDeletionPolicy();
|
||||
IndexCommit indexCommit = delPolicy.getLatestCommit();
|
||||
// race?
|
||||
delPolicy.setReserveDuration(indexCommit.getVersion(), reserveCommitDuration);
|
||||
|
||||
if(indexCommit == null) {
|
||||
indexCommit = req.getSearcher().getReader().getIndexCommit();
|
||||
// race?
|
||||
delPolicy.setReserveDuration(indexCommit.getVersion(), reserveCommitDuration);
|
||||
}
|
||||
if (indexCommit != null) {
|
||||
|
||||
new SnapShooter(core, params.get("location")).createSnapAsync(indexCommit, this);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
LOG.warn("Exception during creating a snapshot", e);
|
||||
rsp.add("exception", e);
|
||||
|
|
Loading…
Reference in New Issue