lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r906086 - /lucene/solr/trunk/src/java/org/apache/solr/handler/ReplicationHandler.java
Date Wed, 03 Feb 2010 15:21:57 GMT
Author: markrmiller
Date: Wed Feb  3 15:21:56 2010
New Revision: 906086

URL: http://svn.apache.org/viewvc?rev=906086&view=rev
Log:
straighten out some whacky code

Modified:
    lucene/solr/trunk/src/java/org/apache/solr/handler/ReplicationHandler.java

Modified: lucene/solr/trunk/src/java/org/apache/solr/handler/ReplicationHandler.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/handler/ReplicationHandler.java?rev=906086&r1=906085&r2=906086&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/handler/ReplicationHandler.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/handler/ReplicationHandler.java Wed Feb  3
15:21:56 2010
@@ -278,14 +278,15 @@
     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);
-      }
+ 
+      new SnapShooter(core, params.get("location")).createSnapAsync(indexCommit, this);
+
     } catch (Exception e) {
       LOG.warn("Exception during creating a snapshot", e);
       rsp.add("exception", e);



Mime
View raw message