parent
333831c126
commit
f46e66e7d0
|
@ -54,7 +54,6 @@ public class IndicesFieldDataCache extends AbstractComponent implements RemovalL
|
|||
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_EXPIRE_KEY = "indices.fielddata.cache.expire";
|
||||
|
||||
|
||||
private final IndicesFieldDataCacheListener indicesFieldDataCacheListener;
|
||||
|
@ -70,7 +69,6 @@ public class IndicesFieldDataCache extends AbstractComponent implements RemovalL
|
|||
this.indicesFieldDataCacheListener = indicesFieldDataCacheListener;
|
||||
final String size = settings.get(INDICES_FIELDDATA_CACHE_SIZE_KEY, "-1");
|
||||
final long sizeInBytes = settings.getAsMemory(INDICES_FIELDDATA_CACHE_SIZE_KEY, "-1").bytes();
|
||||
final TimeValue expire = settings.getAsTime(INDICES_FIELDDATA_CACHE_EXPIRE_KEY, null);
|
||||
CacheBuilder<Key, Accountable> cacheBuilder = CacheBuilder.newBuilder()
|
||||
.removalListener(this);
|
||||
if (sizeInBytes > 0) {
|
||||
|
@ -82,10 +80,8 @@ public class IndicesFieldDataCache extends AbstractComponent implements RemovalL
|
|||
throw new IllegalArgumentException("concurrency_level must be > 0 but was: " + concurrencyLevel);
|
||||
}
|
||||
cacheBuilder.concurrencyLevel(concurrencyLevel);
|
||||
if (expire != null && expire.millis() > 0) {
|
||||
cacheBuilder.expireAfterAccess(expire.millis(), TimeUnit.MILLISECONDS);
|
||||
}
|
||||
logger.debug("using size [{}] [{}], expire [{}]", size, new ByteSizeValue(sizeInBytes), expire);
|
||||
|
||||
logger.debug("using size [{}] [{}]", size, new ByteSizeValue(sizeInBytes));
|
||||
cache = cacheBuilder.build();
|
||||
|
||||
this.cleanInterval = settings.getAsTime(FIELDDATA_CLEAN_INTERVAL_SETTING, TimeValue.timeValueMinutes(1));
|
||||
|
|
|
@ -432,9 +432,6 @@ public final class InternalTestCluster extends TestCluster {
|
|||
if (random.nextBoolean()) {
|
||||
builder.put("indices.fielddata.cache.size", 1 + random.nextInt(1000), ByteSizeUnit.MB);
|
||||
}
|
||||
if (random.nextBoolean()) {
|
||||
builder.put("indices.fielddata.cache.expire", TimeValue.timeValueMillis(1 + random.nextInt(10000)));
|
||||
}
|
||||
}
|
||||
|
||||
// randomize netty settings
|
||||
|
|
|
@ -35,3 +35,10 @@ We've switched the default value of the `detect_noop` option from `false` to
|
|||
source unless you explicitly set `"detect_noop": false`. `detect_noop` was
|
||||
always computationally cheap compared to the expense of the update which can be
|
||||
thought of as a delete operation followed by an index operation.
|
||||
|
||||
=== Removed features
|
||||
|
||||
==== `indices.fielddata.cache.expire`
|
||||
|
||||
The experimental feature `indices.fielddata.cache.expire` has been removed.
|
||||
For indices that have this setting configured, this config will be ignored.
|
|
@ -18,12 +18,6 @@ and perform poorly.
|
|||
absolute value, eg `12GB`. Defaults to unbounded. Also see
|
||||
<<fielddata-circuit-breaker>>.
|
||||
|
||||
`indices.fielddata.cache.expire`::
|
||||
|
||||
experimental[] A time based setting that expires field data after a
|
||||
certain time of inactivity. Defaults to `-1`. For example, can be set to
|
||||
`5m` for a 5 minute expiry.
|
||||
|
||||
NOTE: These are static settings which must be configured on every data node in
|
||||
the cluster.
|
||||
|
||||
|
|
Loading…
Reference in New Issue