mirror of https://github.com/apache/lucene.git
SOLR-1435 ensure that all slaves with same pollInteval fetches index at same time
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@816144 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
812907978d
commit
a726c23c8b
|
@ -163,7 +163,8 @@ public class SnapPuller {
|
|||
}
|
||||
};
|
||||
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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue