From efeb592661a35262a0207d30a971cb43eece042c Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Fri, 19 Aug 2016 15:30:53 +0200 Subject: [PATCH] don't do solr optimization, this create high IO load. We should leave this task to solr to do that on it's own instead of forcing it. --- source/net/yacy/search/ResourceObserver.java | 2 +- source/net/yacy/search/Switchboard.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/net/yacy/search/ResourceObserver.java b/source/net/yacy/search/ResourceObserver.java index a67c6c755..b4ca16ab9 100644 --- a/source/net/yacy/search/ResourceObserver.java +++ b/source/net/yacy/search/ResourceObserver.java @@ -164,7 +164,7 @@ public class ResourceObserver { // run a solr optimize this.sb.index.fulltext().commit(false); - this.sb.index.fulltext().optimize(1); + //this.sb.index.fulltext().optimize(1); if (getNormalizedDiskFree() == Space.AMPLE && getNormalizedDiskUsed(false) == Space.AMPLE) break shrinkmethods; /* diff --git a/source/net/yacy/search/Switchboard.java b/source/net/yacy/search/Switchboard.java index c03b6b1ac..21eea8bb4 100644 --- a/source/net/yacy/search/Switchboard.java +++ b/source/net/yacy/search/Switchboard.java @@ -2568,6 +2568,7 @@ public final class Switchboard extends serverSwitch { this.crawlQueues.noticeURL.clear(); // do solr optimization + /* long idleSearch = System.currentTimeMillis() - this.localSearchLastAccess; long idleAdmin = System.currentTimeMillis() - this.adminAuthenticationLastAccess; long deltaOptimize = System.currentTimeMillis() - this.optimizeLastRun; @@ -2577,7 +2578,6 @@ public final class Switchboard extends serverSwitch { opts++; // have postprocessings will force optimazion with one more Segment which is small an quick optimizeRequired = true; } - log.info("Solr auto-optimization: idleSearch=" + idleSearch + ", idleAdmin=" + idleAdmin + ", deltaOptimize=" + deltaOptimize + ", proccount=" + proccount); if (optimizeRequired) { if (idleSearch < 600000) opts++; // < 10 minutes idle time will cause a optimization with one more Segment which is small an quick @@ -2585,6 +2585,7 @@ public final class Switchboard extends serverSwitch { fulltext.optimize(opts); this.optimizeLastRun = System.currentTimeMillis(); } + */ } // write statistics