Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
clear fulltext-cache and stop crawling if running out of memory
sixcoolera975bcffcb48
diff --git a/source/de/anomic/crawler/ResourceObserver.java b/source/de/anomic/crawler/ResourceObserver.javaindex 07cc1a413..49696af5c 100644--- a/source/de/anomic/crawler/ResourceObserver.java+++ b/source/de/anomic/crawler/ResourceObserver.java@@ -69,16 +69,14 @@ public class ResourceObserver {if (this.normalizedDiskFree.compareTo(Space.HIGH) < 0 || this.normalizedMemoryFree.compareTo(Space.HIGH) < 0 ) {- if (this.normalizedDiskFree.compareTo(Space.HIGH) < 0 ) { // pause crawls- if (!this.sb.crawlJobIsPaused(SwitchboardConstants.CRAWLJOB_LOCAL_CRAWL)) {- log.logInfo("pausing local crawls");- this.sb.pauseCrawlJob(SwitchboardConstants.CRAWLJOB_LOCAL_CRAWL);- }- if (!this.sb.crawlJobIsPaused(SwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL)) {- log.logInfo("pausing remote triggered crawls");- this.sb.pauseCrawlJob(SwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL);- }- }+ if (!this.sb.crawlJobIsPaused(SwitchboardConstants.CRAWLJOB_LOCAL_CRAWL)) {+ log.logInfo("pausing local crawls");+ this.sb.pauseCrawlJob(SwitchboardConstants.CRAWLJOB_LOCAL_CRAWL);+ }+ if (!this.sb.crawlJobIsPaused(SwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL)) {+ log.logInfo("pausing remote triggered crawls");+ this.sb.pauseCrawlJob(SwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL);+ }if ((this.normalizedDiskFree == Space.LOW || this.normalizedMemoryFree.compareTo(Space.HIGH) < 0) && this.sb.getConfigBool(SwitchboardConstants.INDEX_RECEIVE_ALLOW, false)) {log.logInfo("disabling index receive");@@ -86,6 +84,9 @@ public class ResourceObserver {this.sb.peers.mySeed().setFlagAcceptRemoteIndex(false);this.sb.setConfig(SwitchboardConstants.INDEX_RECEIVE_AUTODISABLED, true);}+ if (this.normalizedMemoryFree.compareTo(Space.HIGH) < 0 ) {+ this.sb.index.fulltext().clearCache();+ }}else {