Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
flush the compressor cache when a cleanup is done
Michael Peter Christenb0095c8d3c45
diff --git a/source/de/anomic/crawler/Cache.java b/source/de/anomic/crawler/Cache.javaindex f1867a7fa..d027eb8ab 100644--- a/source/de/anomic/crawler/Cache.java+++ b/source/de/anomic/crawler/Cache.java@@ -143,6 +143,10 @@ public final class Cache {}}+ public static void commit() {+ fileDB.flushAll();+ }+/*** clear the cache*/diff --git a/source/net/yacy/kelondro/blob/Compressor.java b/source/net/yacy/kelondro/blob/Compressor.javaindex 5b9837cdb..e6fc380c6 100644--- a/source/net/yacy/kelondro/blob/Compressor.java+++ b/source/net/yacy/kelondro/blob/Compressor.java@@ -335,7 +335,7 @@ public class Compressor implements BLOB, Iterable<byte[]> {}}- private void flushAll() {+ public void flushAll() {while (!this.buffer.isEmpty()) {if (!flushOne()) break;}diff --git a/source/net/yacy/search/Switchboard.java b/source/net/yacy/search/Switchboard.javaindex 2b3bad5ab..1f5b4ee88 100644--- a/source/net/yacy/search/Switchboard.java+++ b/source/net/yacy/search/Switchboard.java@@ -1892,7 +1892,7 @@ public final class Switchboard extends serverSwitch}public int cleanupJobSize() {- int c = 0;+ int c = 1; // "es gibt immer was zu tun"if ( (this.crawlQueues.delegatedURL.stackSize() > 1000) ) {c++;}@@ -1909,6 +1909,9 @@ public final class Switchboard extends serverSwitchpublic boolean cleanupJob() {try {+ // flush the document compressor cache+ Cache.commit();+// clear caches if necessaryif ( !MemoryControl.request(8000000L, false) ) {for ( final Segment indexSegment : this.indexSegments ) {