From 969b385c59742dad9e97962ad12252f2bbf5f9d1 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Mon, 26 Oct 2015 10:59:27 +0100 Subject: [PATCH] assign IMC frst --- .../main/java/org/elasticsearch/index/shard/IndexShard.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/elasticsearch/index/shard/IndexShard.java b/core/src/main/java/org/elasticsearch/index/shard/IndexShard.java index f0772f88603..c3c5f428d8b 100644 --- a/core/src/main/java/org/elasticsearch/index/shard/IndexShard.java +++ b/core/src/main/java/org/elasticsearch/index/shard/IndexShard.java @@ -240,12 +240,13 @@ public class IndexShard extends AbstractIndexShardComponent implements IndexSett } else { cachingPolicy = new UsageTrackingQueryCachingPolicy(); } + + this.indexingMemoryController = provider.getIndexingMemoryController(); this.engineConfig = newEngineConfig(translogConfig, cachingPolicy); this.flushThresholdOperations = indexSettings.getAsInt(INDEX_TRANSLOG_FLUSH_THRESHOLD_OPS, indexSettings.getAsInt("index.translog.flush_threshold", Integer.MAX_VALUE)); this.flushThresholdSize = indexSettings.getAsBytesSize(INDEX_TRANSLOG_FLUSH_THRESHOLD_SIZE, new ByteSizeValue(512, ByteSizeUnit.MB)); this.disableFlush = indexSettings.getAsBoolean(INDEX_TRANSLOG_DISABLE_FLUSH, false); this.indexShardOperationCounter = new IndexShardOperationCounter(logger, shardId); - this.indexingMemoryController = provider.getIndexingMemoryController(); this.searcherWrapper = provider.getIndexSearcherWrapper(); this.percolatorQueriesRegistry = new PercolatorQueriesRegistry(shardId, indexSettings, provider.getQueryParserService(), indexingService, mapperService, indexFieldDataService);