diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2019-03-07 18:00:38 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2019-03-07 18:04:32 +0100 |
commit | e43b67aaa104fe87b2077f19ae8a0e744e177603 (patch) | |
tree | 7ede786a3a34b02f1694946f0eb84a8bfdc7ce1a /container-search/src/main/java/com/yahoo/prelude/cluster/ClusterSearcher.java | |
parent | bb9e49ed647fdb06b7daa46ab1d981040c5295ce (diff) |
Remove the packet cache. It will very soon loose its value as we are changing the protocol.
And also as it does not work for grouping I think it is better to just let it go.
We might want a cache sometime later, but then we should redesign it.
Diffstat (limited to 'container-search/src/main/java/com/yahoo/prelude/cluster/ClusterSearcher.java')
-rw-r--r-- | container-search/src/main/java/com/yahoo/prelude/cluster/ClusterSearcher.java | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/container-search/src/main/java/com/yahoo/prelude/cluster/ClusterSearcher.java b/container-search/src/main/java/com/yahoo/prelude/cluster/ClusterSearcher.java index 92b6eef906e..c9a156faede 100644 --- a/container-search/src/main/java/com/yahoo/prelude/cluster/ClusterSearcher.java +++ b/container-search/src/main/java/com/yahoo/prelude/cluster/ClusterSearcher.java @@ -17,8 +17,6 @@ import com.yahoo.prelude.fastsearch.FS4ResourcePool; import com.yahoo.prelude.IndexFacts; import com.yahoo.prelude.Ping; import com.yahoo.prelude.Pong; -import com.yahoo.prelude.fastsearch.CacheControl; -import com.yahoo.prelude.fastsearch.CacheParams; import com.yahoo.prelude.fastsearch.ClusterParams; import com.yahoo.prelude.fastsearch.DocumentdbInfoConfig; import com.yahoo.prelude.fastsearch.FastSearcher; @@ -127,7 +125,6 @@ public class ClusterSearcher extends Searcher { maxQueryCacheTimeout = ParameterParser.asMilliSeconds(clusterConfig.maxQueryCacheTimeout(), DEFAULT_MAX_QUERY_CACHE_TIMEOUT); - CacheParams cacheParams = new CacheParams(createCache(clusterConfig, clusterModelName)); SummaryParameters docSumParams = new SummaryParameters(qrsConfig .com().yahoo().prelude().fastsearch().FastSearcher().docsum() .defaultclass()); @@ -144,7 +141,7 @@ public class ClusterSearcher extends Searcher { if (searchClusterConfig.indexingmode() == STREAMING) { VdsStreamingSearcher searcher = vdsCluster(fs4ResourcePool.getServerId(), searchClusterIndex, - searchClusterConfig, cacheParams, docSumParams, + searchClusterConfig, docSumParams, documentDbConfig); addBackendSearcher(searcher); } else { @@ -153,8 +150,7 @@ public class ClusterSearcher extends Searcher { try { if ( ! isRemote(searchClusterConfig.dispatcher(dispatcherIndex).host())) { Backend dispatchBackend = createBackend(searchClusterConfig.dispatcher(dispatcherIndex)); - FastSearcher searcher = searchDispatch(searchClusterIndex, fs4ResourcePool, - cacheParams, docSumParams, + FastSearcher searcher = searchDispatch(searchClusterIndex, fs4ResourcePool, docSumParams, documentDbConfig, dispatchBackend, dispatcher, dispatcherIndex); addBackendSearcher(searcher); } @@ -196,7 +192,6 @@ public class ClusterSearcher extends Searcher { private static FastSearcher searchDispatch(int searchclusterIndex, FS4ResourcePool fs4ResourcePool, - CacheParams cacheParams, SummaryParameters docSumParams, DocumentdbInfoConfig documentdbInfoConfig, Backend backend, @@ -204,14 +199,13 @@ public class ClusterSearcher extends Searcher { int dispatcherIndex) { ClusterParams clusterParams = makeClusterParams(searchclusterIndex, dispatcherIndex); - return new FastSearcher(backend, fs4ResourcePool, dispatcher, docSumParams, clusterParams, cacheParams, + return new FastSearcher(backend, fs4ResourcePool, dispatcher, docSumParams, clusterParams, documentdbInfoConfig); } private static VdsStreamingSearcher vdsCluster(String serverId, int searchclusterIndex, QrSearchersConfig.Searchcluster searchClusterConfig, - CacheParams cacheParams, SummaryParameters docSumParams, DocumentdbInfoConfig documentdbInfoConfig) { @@ -224,7 +218,7 @@ public class ClusterSearcher extends Searcher { searcher.setSearchClusterConfigId(searchClusterConfig.rankprofiles().configid()); searcher.setDocumentType(searchClusterConfig.searchdef(0)); searcher.setStorageClusterRouteSpec(searchClusterConfig.storagecluster().routespec()); - searcher.init(serverId, docSumParams, clusterParams, cacheParams, documentdbInfoConfig); + searcher.init(serverId, docSumParams, clusterParams, documentdbInfoConfig); return searcher; } @@ -244,14 +238,6 @@ public class ClusterSearcher extends Searcher { return fs4ResourcePool.getBackend(disp.host(), disp.port()); } - private static CacheControl createCache(ClusterConfig config, String clusterModelName) { - log.log(Level.INFO, "Enabling cache for search cluster " - + clusterModelName + " (size=" + config.cacheSize() - + ", timeout=" + config.cacheTimeout() + ")"); - - return new CacheControl(config.cacheSize(), config.cacheTimeout()); - } - ClusterMonitor getMonitor() { return monitor; } |