lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject svn commit: r816144 - /lucene/solr/trunk/src/java/org/apache/solr/handler/SnapPuller.java
Date Thu, 17 Sep 2009 11:27:37 GMT
Author: noble
Date: Thu Sep 17 11:27:36 2009
New Revision: 816144

URL: http://svn.apache.org/viewvc?rev=816144&view=rev
Log:
SOLR-1435 ensure that all slaves with same pollInteval fetches index at same time

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

Modified: lucene/solr/trunk/src/java/org/apache/solr/handler/SnapPuller.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/handler/SnapPuller.java?rev=816144&r1=816143&r2=816144&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/handler/SnapPuller.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/handler/SnapPuller.java Thu Sep 17 11:27:36
2009
@@ -163,7 +163,8 @@
       }
     };
     executorService = Executors.newSingleThreadScheduledExecutor();
-    executorService.scheduleAtFixedRate(task, pollInterval, pollInterval, TimeUnit.MILLISECONDS);
+    long initialDelay = pollInterval - (System.currentTimeMillis() % pollInterval);
+    executorService.scheduleAtFixedRate(task, initialDelay, pollInterval, TimeUnit.MILLISECONDS);
     LOG.info("Poll Scheduled at an interval of " + pollInterval + "ms");
   }
 



Mime
View raw message