removed forced non-soft commits to prevent index fragmentation

pull/1/head
orbiter 12 years ago
parent 31483c47e1
commit c124037f19

@ -2887,7 +2887,6 @@ public final class Switchboard extends serverSwitch {
try {Thread.sleep(100);} catch (final InterruptedException e) {}
ConcurrentLog.fine("Switchboard", "STACKURL: waiting for deletion, t=" + t);
if (t == 20) this.index.fulltext().commit(true);
if (t == 50) this.index.fulltext().commit(false);
}
// special handling of ftp protocol

@ -591,23 +591,6 @@ public class Segment {
) {
final long startTime = System.currentTimeMillis();
// DO A SOFT/HARD COMMIT IF NEEDED
if (MemoryControl.shortStatus()) {
// do a 'hard' commit to flush index caches
this.fulltext.commit(false);
} else {
/*
if (
(this.fulltext.getDefaultConfiguration().contains(CollectionSchema.exact_signature_l) && this.fulltext.getDefaultConfiguration().contains(CollectionSchema.exact_signature_unique_b)) ||
(this.fulltext.getDefaultConfiguration().contains(CollectionSchema.fuzzy_signature_l) && this.fulltext.getDefaultConfiguration().contains(CollectionSchema.fuzzy_signature_unique_b)) ||
this.fulltext.getDefaultConfiguration().contains(CollectionSchema.title_unique_b) ||
this.fulltext.getDefaultConfiguration().contains(CollectionSchema.description_unique_b)
) {
this.fulltext.getDefaultConnector().commit(true); // make sure that we have latest information for the postprocessing steps
}
*/
}
// CREATE INDEX
// load some document metadata
@ -696,7 +679,7 @@ public class Segment {
} catch (final IOException e ) {
error = "failed to send " + urlNormalform + " to solr: " + e.getMessage();
ConcurrentLog.warn("SOLR", error);
if (i == 10) this.fulltext.commit(false);
if (i == 10) this.fulltext.commit(true);
try {Thread.sleep(1000);} catch (final InterruptedException e1) {}
continue tryloop;
}

@ -64,7 +64,6 @@ import net.yacy.cora.storage.HandleSet;
import net.yacy.cora.util.CommonPattern;
import net.yacy.cora.util.ConcurrentLog;
import net.yacy.cora.util.SpaceExceededException;
import net.yacy.crawler.data.CrawlProfile;
import net.yacy.crawler.retrieval.Response;
import net.yacy.document.Condenser;
import net.yacy.document.Document;

Loading…
Cancel
Save