From 3d3c2cd7605577486618cbeb475a8227eca1b7dd Mon Sep 17 00:00:00 2001 From: Boaz Leskes Date: Thu, 9 Oct 2014 11:35:59 +0200 Subject: [PATCH] add verbose logging during index close --- .../index/service/InternalIndexService.java | 8 ++++++-- .../elasticsearch/indices/InternalIndicesService.java | 11 +++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/elasticsearch/index/service/InternalIndexService.java b/src/main/java/org/elasticsearch/index/service/InternalIndexService.java index e29e56fb84a..41fa3d0cf24 100644 --- a/src/main/java/org/elasticsearch/index/service/InternalIndexService.java +++ b/src/main/java/org/elasticsearch/index/service/InternalIndexService.java @@ -34,6 +34,8 @@ import org.elasticsearch.index.aliases.IndexAliasesService; import org.elasticsearch.index.analysis.AnalysisService; import org.elasticsearch.index.cache.IndexCache; import org.elasticsearch.index.cache.filter.ShardFilterCacheModule; +import org.elasticsearch.index.cache.fixedbitset.FixedBitSetFilterCache; +import org.elasticsearch.index.cache.fixedbitset.ShardFixedBitSetFilterCacheModule; import org.elasticsearch.index.cache.query.ShardQueryCacheModule; import org.elasticsearch.index.deletionpolicy.DeletionPolicyModule; import org.elasticsearch.index.engine.Engine; @@ -54,8 +56,6 @@ import org.elasticsearch.index.merge.scheduler.MergeSchedulerProvider; import org.elasticsearch.index.percolator.PercolatorQueriesRegistry; import org.elasticsearch.index.percolator.PercolatorShardModule; import org.elasticsearch.index.query.IndexQueryParserService; -import org.elasticsearch.index.cache.fixedbitset.FixedBitSetFilterCache; -import org.elasticsearch.index.cache.fixedbitset.ShardFixedBitSetFilterCacheModule; import org.elasticsearch.index.search.stats.ShardSearchModule; import org.elasticsearch.index.settings.IndexSettings; import org.elasticsearch.index.settings.IndexSettingsService; @@ -384,6 +384,8 @@ public class InternalIndexService extends AbstractIndexComponent implements Inde if (shardInjector == null) { return; } + + logger.debug("closing... (reason: [{}])", reason); shardsInjectors = ImmutableMap.copyOf(tmpShardInjectors); Map tmpShardsMap = newHashMap(shards); indexShard = tmpShardsMap.remove(shardId); @@ -463,5 +465,7 @@ public class InternalIndexService extends AbstractIndexComponent implements Inde logger.warn("failed to close store on shard deletion", e); } Injectors.close(injector); + + logger.debug("closed (reason: [{}])", reason); } } diff --git a/src/main/java/org/elasticsearch/indices/InternalIndicesService.java b/src/main/java/org/elasticsearch/indices/InternalIndicesService.java index 45b78cfabad..2cb72e6ed04 100644 --- a/src/main/java/org/elasticsearch/indices/InternalIndicesService.java +++ b/src/main/java/org/elasticsearch/indices/InternalIndicesService.java @@ -326,6 +326,7 @@ public class InternalIndicesService extends AbstractLifecycleComponent tmpMap = newHashMap(indices); indexService = tmpMap.remove(index); indices = ImmutableMap.copyOf(tmpMap); @@ -336,21 +337,31 @@ public class InternalIndicesService extends AbstractLifecycleComponent