add verbose logging during index close
This commit is contained in:
parent
668def0ddd
commit
3d3c2cd760
|
@ -34,6 +34,8 @@ import org.elasticsearch.index.aliases.IndexAliasesService;
|
||||||
import org.elasticsearch.index.analysis.AnalysisService;
|
import org.elasticsearch.index.analysis.AnalysisService;
|
||||||
import org.elasticsearch.index.cache.IndexCache;
|
import org.elasticsearch.index.cache.IndexCache;
|
||||||
import org.elasticsearch.index.cache.filter.ShardFilterCacheModule;
|
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.cache.query.ShardQueryCacheModule;
|
||||||
import org.elasticsearch.index.deletionpolicy.DeletionPolicyModule;
|
import org.elasticsearch.index.deletionpolicy.DeletionPolicyModule;
|
||||||
import org.elasticsearch.index.engine.Engine;
|
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.PercolatorQueriesRegistry;
|
||||||
import org.elasticsearch.index.percolator.PercolatorShardModule;
|
import org.elasticsearch.index.percolator.PercolatorShardModule;
|
||||||
import org.elasticsearch.index.query.IndexQueryParserService;
|
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.search.stats.ShardSearchModule;
|
||||||
import org.elasticsearch.index.settings.IndexSettings;
|
import org.elasticsearch.index.settings.IndexSettings;
|
||||||
import org.elasticsearch.index.settings.IndexSettingsService;
|
import org.elasticsearch.index.settings.IndexSettingsService;
|
||||||
|
@ -384,6 +384,8 @@ public class InternalIndexService extends AbstractIndexComponent implements Inde
|
||||||
if (shardInjector == null) {
|
if (shardInjector == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.debug("closing... (reason: [{}])", reason);
|
||||||
shardsInjectors = ImmutableMap.copyOf(tmpShardInjectors);
|
shardsInjectors = ImmutableMap.copyOf(tmpShardInjectors);
|
||||||
Map<Integer, IndexShard> tmpShardsMap = newHashMap(shards);
|
Map<Integer, IndexShard> tmpShardsMap = newHashMap(shards);
|
||||||
indexShard = tmpShardsMap.remove(shardId);
|
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);
|
logger.warn("failed to close store on shard deletion", e);
|
||||||
}
|
}
|
||||||
Injectors.close(injector);
|
Injectors.close(injector);
|
||||||
|
|
||||||
|
logger.debug("closed (reason: [{}])", reason);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -326,6 +326,7 @@ public class InternalIndicesService extends AbstractLifecycleComponent<IndicesSe
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.debug("[{}] closing ... (reason [{}])", index, reason);
|
||||||
Map<String, IndexService> tmpMap = newHashMap(indices);
|
Map<String, IndexService> tmpMap = newHashMap(indices);
|
||||||
indexService = tmpMap.remove(index);
|
indexService = tmpMap.remove(index);
|
||||||
indices = ImmutableMap.copyOf(tmpMap);
|
indices = ImmutableMap.copyOf(tmpMap);
|
||||||
|
@ -336,21 +337,31 @@ public class InternalIndicesService extends AbstractLifecycleComponent<IndicesSe
|
||||||
indexInjector.getInstance(closeable).close();
|
indexInjector.getInstance(closeable).close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.debug("[{}] closing index service", index, reason);
|
||||||
((InternalIndexService) indexService).close(reason, executor);
|
((InternalIndexService) indexService).close(reason, executor);
|
||||||
|
|
||||||
|
logger.debug("[{}] closing index cache", index, reason);
|
||||||
indexInjector.getInstance(IndexCache.class).close();
|
indexInjector.getInstance(IndexCache.class).close();
|
||||||
|
logger.debug("[{}] clearing index field data", index, reason);
|
||||||
indexInjector.getInstance(IndexFieldDataService.class).clear();
|
indexInjector.getInstance(IndexFieldDataService.class).clear();
|
||||||
|
logger.debug("[{}] closing analysis service", index, reason);
|
||||||
indexInjector.getInstance(AnalysisService.class).close();
|
indexInjector.getInstance(AnalysisService.class).close();
|
||||||
|
logger.debug("[{}] closing index engine", index, reason);
|
||||||
indexInjector.getInstance(IndexEngine.class).close();
|
indexInjector.getInstance(IndexEngine.class).close();
|
||||||
|
|
||||||
|
logger.debug("[{}] closing index gateway", index, reason);
|
||||||
indexInjector.getInstance(IndexGateway.class).close();
|
indexInjector.getInstance(IndexGateway.class).close();
|
||||||
|
logger.debug("[{}] closing mapper service", index, reason);
|
||||||
indexInjector.getInstance(MapperService.class).close();
|
indexInjector.getInstance(MapperService.class).close();
|
||||||
|
logger.debug("[{}] closing index query parser service", index, reason);
|
||||||
indexInjector.getInstance(IndexQueryParserService.class).close();
|
indexInjector.getInstance(IndexQueryParserService.class).close();
|
||||||
|
|
||||||
|
logger.debug("[{}] closing index service", index, reason);
|
||||||
indexInjector.getInstance(IndexStore.class).close();
|
indexInjector.getInstance(IndexStore.class).close();
|
||||||
|
|
||||||
Injectors.close(injector);
|
Injectors.close(injector);
|
||||||
|
|
||||||
|
logger.debug("[{}] closed... (reason [{}])", index, reason);
|
||||||
indicesLifecycle.afterIndexClosed(indexService.index());
|
indicesLifecycle.afterIndexClosed(indexService.index());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue