Remove cache concurrency level settings that no longer apply
This commit removes some cache concurrency level settings that were applicable when the cache was backed by the Guava cache implementation, but no longer apply with the cache implementation completed in #13717. Relates #7836, relates #13224, relates #13717
This commit is contained in:
parent
1b461a7f9d
commit
18b32f0ba5
|
@ -79,7 +79,6 @@ public class IndicesRequestCache extends AbstractComponent implements RemovalLis
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static final String DEPRECATED_INDICES_CACHE_QUERY_SIZE = "indices.cache.query.size";
|
public static final String DEPRECATED_INDICES_CACHE_QUERY_SIZE = "indices.cache.query.size";
|
||||||
public static final String INDICES_CACHE_QUERY_EXPIRE = "indices.requests.cache.expire";
|
public static final String INDICES_CACHE_QUERY_EXPIRE = "indices.requests.cache.expire";
|
||||||
public static final String INDICES_CACHE_QUERY_CONCURRENCY_LEVEL = "indices.requests.cache.concurrency_level";
|
|
||||||
|
|
||||||
private static final Set<SearchType> CACHEABLE_SEARCH_TYPES = EnumSet.of(SearchType.QUERY_THEN_FETCH, SearchType.QUERY_AND_FETCH);
|
private static final Set<SearchType> CACHEABLE_SEARCH_TYPES = EnumSet.of(SearchType.QUERY_THEN_FETCH, SearchType.QUERY_AND_FETCH);
|
||||||
|
|
||||||
|
@ -96,7 +95,6 @@ public class IndicesRequestCache extends AbstractComponent implements RemovalLis
|
||||||
//TODO make these changes configurable on the cluster level
|
//TODO make these changes configurable on the cluster level
|
||||||
private final String size;
|
private final String size;
|
||||||
private final TimeValue expire;
|
private final TimeValue expire;
|
||||||
private final int concurrencyLevel;
|
|
||||||
|
|
||||||
private volatile Cache<Key, Value> cache;
|
private volatile Cache<Key, Value> cache;
|
||||||
|
|
||||||
|
@ -122,11 +120,6 @@ public class IndicesRequestCache extends AbstractComponent implements RemovalLis
|
||||||
this.size = size;
|
this.size = size;
|
||||||
|
|
||||||
this.expire = settings.getAsTime(INDICES_CACHE_QUERY_EXPIRE, null);
|
this.expire = settings.getAsTime(INDICES_CACHE_QUERY_EXPIRE, null);
|
||||||
// defaults to 4, but this is a busy map for all indices, increase it a bit by default
|
|
||||||
this.concurrencyLevel = settings.getAsInt(INDICES_CACHE_QUERY_CONCURRENCY_LEVEL, 16);
|
|
||||||
if (concurrencyLevel <= 0) {
|
|
||||||
throw new IllegalArgumentException("concurrency_level must be > 0 but was: " + concurrencyLevel);
|
|
||||||
}
|
|
||||||
buildCache();
|
buildCache();
|
||||||
|
|
||||||
this.reaper = new Reaper();
|
this.reaper = new Reaper();
|
||||||
|
|
|
@ -55,7 +55,6 @@ import java.util.function.ToLongBiFunction;
|
||||||
public class IndicesFieldDataCache extends AbstractComponent implements RemovalListener<IndicesFieldDataCache.Key, Accountable> {
|
public class IndicesFieldDataCache extends AbstractComponent implements RemovalListener<IndicesFieldDataCache.Key, Accountable> {
|
||||||
|
|
||||||
public static final String FIELDDATA_CLEAN_INTERVAL_SETTING = "indices.fielddata.cache.cleanup_interval";
|
public static final String FIELDDATA_CLEAN_INTERVAL_SETTING = "indices.fielddata.cache.cleanup_interval";
|
||||||
public static final String FIELDDATA_CACHE_CONCURRENCY_LEVEL = "indices.fielddata.cache.concurrency_level";
|
|
||||||
public static final String INDICES_FIELDDATA_CACHE_SIZE_KEY = "indices.fielddata.cache.size";
|
public static final String INDICES_FIELDDATA_CACHE_SIZE_KEY = "indices.fielddata.cache.size";
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -478,10 +478,6 @@ public final class InternalTestCluster extends TestCluster {
|
||||||
builder.put(RecoverySettings.INDICES_RECOVERY_COMPRESS, random.nextBoolean());
|
builder.put(RecoverySettings.INDICES_RECOVERY_COMPRESS, random.nextBoolean());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (random.nextBoolean()) {
|
|
||||||
builder.put(IndicesRequestCache.INDICES_CACHE_QUERY_CONCURRENCY_LEVEL, RandomInts.randomIntBetween(random, 1, 32));
|
|
||||||
builder.put(IndicesFieldDataCache.FIELDDATA_CACHE_CONCURRENCY_LEVEL, RandomInts.randomIntBetween(random, 1, 32));
|
|
||||||
}
|
|
||||||
if (random.nextBoolean()) {
|
if (random.nextBoolean()) {
|
||||||
builder.put(NettyTransport.PING_SCHEDULE, RandomInts.randomIntBetween(random, 100, 2000) + "ms");
|
builder.put(NettyTransport.PING_SCHEDULE, RandomInts.randomIntBetween(random, 100, 2000) + "ms");
|
||||||
}
|
}
|
||||||
|
|
|
@ -312,3 +312,9 @@ For simplicity, only one way of adding the ids to the existing list (empty by de
|
||||||
`DocumentAlreadyExistsException` is removed and a `VersionConflictException` is thrown instead (with a better
|
`DocumentAlreadyExistsException` is removed and a `VersionConflictException` is thrown instead (with a better
|
||||||
error description). This will influence code that use the `IndexRequest.opType()` or `IndexRequest.create()`
|
error description). This will influence code that use the `IndexRequest.opType()` or `IndexRequest.create()`
|
||||||
to index a document only if it doesn't already exist.
|
to index a document only if it doesn't already exist.
|
||||||
|
|
||||||
|
=== Cache concurrency level settings removed
|
||||||
|
|
||||||
|
Two cache concurrency level settings `indices.requests.cache.concurrency_level` and
|
||||||
|
`indices.fielddata.cache.concurrency_level` because they no longer apply to the cache implementation used for the
|
||||||
|
request cache and the field data cache.
|
||||||
|
|
Loading…
Reference in New Issue