avoid calling CheckpointService.hasAvailableCheckpoints() when crawl not launchable and therefore the info is not needed, because it calls isRunning() which is synchronized and blocks when checkpoint is in progress

This commit is contained in:
Noah Levitt
2014-05-22 16:40:44 -07:00
parent 1c0d6c60fb
commit 39814d1efd
@@ -127,7 +127,7 @@ public class CrawlJobModel extends LinkedHashMap<String, Object> implements Seri
List<String> checkpointFiles = new ArrayList<String>();
if (crawlJob.getCheckpointService() != null) {
if (crawlJob.getCheckpointService().hasAvailableCheckpoints() && crawlJob.isLaunchable()) {
if (crawlJob.isLaunchable() && crawlJob.getCheckpointService().hasAvailableCheckpoints()) {
for (File f : crawlJob.getCheckpointService().findAvailableCheckpointDirectories()) {
checkpointFiles.add(f.getName());
}