apply @rjernst review comments
This commit is contained in:
parent
0dac6bfa86
commit
cf0179bf12
|
@ -271,7 +271,6 @@ public class IndicesService extends AbstractLifecycleComponent<IndicesService> i
|
||||||
idxSettings.getNumberOfReplicas(),
|
idxSettings.getNumberOfReplicas(),
|
||||||
idxSettings.isShadowReplicaIndex() ? "s" : "");
|
idxSettings.isShadowReplicaIndex() ? "s" : "");
|
||||||
|
|
||||||
// plugin modules must be added here, before others or we can get crazy injection errors...
|
|
||||||
final IndexModule indexModule = new IndexModule(idxSettings, indexStoreConfig, analysisRegistry);
|
final IndexModule indexModule = new IndexModule(idxSettings, indexStoreConfig, analysisRegistry);
|
||||||
pluginsService.onIndexModule(indexModule);
|
pluginsService.onIndexModule(indexModule);
|
||||||
for (IndexEventListener listener : builtInListeners) {
|
for (IndexEventListener listener : builtInListeners) {
|
||||||
|
|
|
@ -423,7 +423,7 @@ public class IndexingMemoryController extends AbstractLifecycleComponent<Indexin
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onShardActive(IndexShard indexShard) {
|
public void onShardActive(IndexShard indexShard) {
|
||||||
// At least on shard used to be inactive ie. a new write operation just showed up.
|
// At least one shard used to be inactive ie. a new write operation just showed up.
|
||||||
// We try to fix the shards indexing buffer immediately. We could do this async instead, but cost should
|
// We try to fix the shards indexing buffer immediately. We could do this async instead, but cost should
|
||||||
// be low, and it's rare this happens.
|
// be low, and it's rare this happens.
|
||||||
forceCheck();
|
forceCheck();
|
||||||
|
|
|
@ -29,7 +29,6 @@ import org.elasticsearch.Version;
|
||||||
import org.elasticsearch.cache.recycler.PageCacheRecycler;
|
import org.elasticsearch.cache.recycler.PageCacheRecycler;
|
||||||
import org.elasticsearch.client.Client;
|
import org.elasticsearch.client.Client;
|
||||||
import org.elasticsearch.cluster.metadata.IndexMetaData;
|
import org.elasticsearch.cluster.metadata.IndexMetaData;
|
||||||
import org.elasticsearch.common.inject.ModuleTestCase;
|
|
||||||
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
||||||
import org.elasticsearch.common.settings.Settings;
|
import org.elasticsearch.common.settings.Settings;
|
||||||
import org.elasticsearch.common.util.BigArrays;
|
import org.elasticsearch.common.util.BigArrays;
|
||||||
|
@ -60,6 +59,7 @@ import org.elasticsearch.script.ScriptContextRegistry;
|
||||||
import org.elasticsearch.script.ScriptEngineService;
|
import org.elasticsearch.script.ScriptEngineService;
|
||||||
import org.elasticsearch.script.ScriptService;
|
import org.elasticsearch.script.ScriptService;
|
||||||
import org.elasticsearch.script.mustache.MustacheScriptEngineService;
|
import org.elasticsearch.script.mustache.MustacheScriptEngineService;
|
||||||
|
import org.elasticsearch.test.ESTestCase;
|
||||||
import org.elasticsearch.test.IndexSettingsModule;
|
import org.elasticsearch.test.IndexSettingsModule;
|
||||||
import org.elasticsearch.test.engine.MockEngineFactory;
|
import org.elasticsearch.test.engine.MockEngineFactory;
|
||||||
import org.elasticsearch.threadpool.ThreadPool;
|
import org.elasticsearch.threadpool.ThreadPool;
|
||||||
|
@ -74,7 +74,7 @@ import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class IndexModuleTests extends ModuleTestCase {
|
public class IndexModuleTests extends ESTestCase {
|
||||||
private Index index;
|
private Index index;
|
||||||
private Settings settings;
|
private Settings settings;
|
||||||
private IndexSettings indexSettings;
|
private IndexSettings indexSettings;
|
||||||
|
|
|
@ -188,6 +188,7 @@ public class BitSetFilterCacheTests extends ESTestCase {
|
||||||
new BitsetFilterCache(INDEX_SETTINGS, warmer, null);
|
new BitsetFilterCache(INDEX_SETTINGS, warmer, null);
|
||||||
fail("listener can't be null");
|
fail("listener can't be null");
|
||||||
} catch (IllegalArgumentException ex) {
|
} catch (IllegalArgumentException ex) {
|
||||||
|
assertEquals("listener must not be null", ex.getMessage());
|
||||||
// all is well
|
// all is well
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue