Remove the `default` store type. (#21616)

It used to be a hybrid store between `niofs` and `mmapfs`, which we removed when
we switched to `fs` by default (which is `mmapfs` on 64-bits systems).
This commit is contained in:
Adrien Grand 2016-11-30 15:33:26 +01:00 committed by GitHub
parent 90ab477f19
commit c5b9c98b99
4 changed files with 8 additions and 5 deletions

View File

@ -295,9 +295,7 @@ public final class IndexModule {
NIOFS, NIOFS,
MMAPFS, MMAPFS,
SIMPLEFS, SIMPLEFS,
FS, FS;
@Deprecated
DEFAULT;
public String getSettingsKey() { public String getSettingsKey() {
return this.name().toLowerCase(Locale.ROOT); return this.name().toLowerCase(Locale.ROOT);

View File

@ -84,7 +84,7 @@ public class FsDirectoryService extends DirectoryService {
protected Directory newFSDirectory(Path location, LockFactory lockFactory) throws IOException { protected Directory newFSDirectory(Path location, LockFactory lockFactory) throws IOException {
final String storeType = indexSettings.getSettings().get(IndexModule.INDEX_STORE_TYPE_SETTING.getKey(), final String storeType = indexSettings.getSettings().get(IndexModule.INDEX_STORE_TYPE_SETTING.getKey(),
IndexModule.Type.FS.getSettingsKey()); IndexModule.Type.FS.getSettingsKey());
if (IndexModule.Type.FS.match(storeType) || IndexModule.Type.DEFAULT.match(storeType)) { if (IndexModule.Type.FS.match(storeType)) {
return FSDirectory.open(location, lockFactory); // use lucene defaults return FSDirectory.open(location, lockFactory); // use lucene defaults
} else if (IndexModule.Type.SIMPLEFS.match(storeType)) { } else if (IndexModule.Type.SIMPLEFS.match(storeType)) {
return new SimpleFSDirectory(location, lockFactory); return new SimpleFSDirectory(location, lockFactory);

View File

@ -73,7 +73,6 @@ public class IndexStoreTests extends ESTestCase {
assertTrue(type + " " + directory.toString(), directory instanceof SimpleFSDirectory); assertTrue(type + " " + directory.toString(), directory instanceof SimpleFSDirectory);
break; break;
case FS: case FS:
case DEFAULT:
if (Constants.JRE_IS_64BIT && MMapDirectory.UNMAP_SUPPORTED) { if (Constants.JRE_IS_64BIT && MMapDirectory.UNMAP_SUPPORTED) {
assertTrue(directory.toString(), directory instanceof MMapDirectory); assertTrue(directory.toString(), directory instanceof MMapDirectory);
} else if (Constants.WINDOWS) { } else if (Constants.WINDOWS) {

View File

@ -14,3 +14,9 @@ Store throttling has been removed. As a consequence, the
cluster settings and the `index.store.throttle.type` and cluster settings and the `index.store.throttle.type` and
`index.store.throttle.max_bytes_per_sec` index settings are not `index.store.throttle.max_bytes_per_sec` index settings are not
recognized anymore. recognized anymore.
==== Store settings
The `default` `index.store.type` has been removed. If you were using it, we
advise that you simply remove it from your index settings and Elasticsearch
will use the best `store` implementation for your operating system.