flush the compressor cache when a cleanup is done

pull/1/head
Michael Peter Christen 13 years ago
parent a61f44f9e4
commit b0095c8d3c

@ -143,6 +143,10 @@ public final class Cache {
}
}
public static void commit() {
fileDB.flushAll();
}
/**
* clear the cache
*/

@ -335,7 +335,7 @@ public class Compressor implements BLOB, Iterable<byte[]> {
}
}
private void flushAll() {
public void flushAll() {
while (!this.buffer.isEmpty()) {
if (!flushOne()) break;
}

@ -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 serverSwitch
public boolean cleanupJob() {
try {
// flush the document compressor cache
Cache.commit();
// clear caches if necessary
if ( !MemoryControl.request(8000000L, false) ) {
for ( final Segment indexSegment : this.indexSegments ) {

Loading…
Cancel
Save