Skip to content

Commit

Permalink
Remove index.force_memory_term_dictionary setting (#48873)
Browse files Browse the repository at this point in the history
This temporary setting was introduced in #39741 but has had no effect since it
was deprecated in #42838. This commit removes this setting.
  • Loading branch information
DaveCTurner committed Nov 6, 2019
1 parent 72fe9ce commit 3ce7a37
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
13 changes: 12 additions & 1 deletion docs/reference/migration/migrate_8_0/indices.asciidoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[float]
[[breaking_80_indices_changes]]
=== Force Merge API changes
=== Indices changes

[float]
==== Force Merge API changes

Previously, the Force Merge API allowed the parameters `only_expunge_deletes`
and `max_num_segments` to be set to a non default value at the same time. But
Expand All @@ -9,3 +12,11 @@ to `true`, leaving the false impression that it has been applied.

The Force Merge API now rejects requests that have a `max_num_segments` greater
than or equal to 0 when the `only_expunge_deletes` is set to true.

[float]
==== On-disk term dictionary cannot be disabled

The `index.force_memory_term_dictionary` setting was introduced in 7.0 as a
temporary measure to allow users to opt-out of the optimization that leaves the
term dictionary on disk when appropriate. This optimization is now mandatory
and the setting is removed.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ public final class IndexScopedSettings extends AbstractScopedSettings {
IndexModule.INDEX_STORE_PRE_LOAD_SETTING,
IndexModule.INDEX_QUERY_CACHE_ENABLED_SETTING,
FsDirectoryFactory.INDEX_LOCK_FACTOR_SETTING,
Store.FORCE_RAM_TERM_DICT,
EngineConfig.INDEX_CODEC_SETTING,
IndexMetaData.SETTING_WAIT_FOR_ACTIVE_SHARDS,
IndexSettings.DEFAULT_PIPELINE,
Expand Down
8 changes: 0 additions & 8 deletions server/src/main/java/org/elasticsearch/index/store/Store.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,6 @@
* </pre>
*/
public class Store extends AbstractIndexShardComponent implements Closeable, RefCounted {
/**
* This is an escape hatch for lucenes internal optimization that checks if the IndexInput is an instance of ByteBufferIndexInput
* and if that's the case doesn't load the term dictionary into ram but loads it off disk iff the fields is not an ID like field.
* Since this optimization has been added very late in the release processes we add this setting to allow users to opt-out of
* this by exploiting lucene internals and wrapping the IndexInput in a simple delegate.
*/
public static final Setting<Boolean> FORCE_RAM_TERM_DICT = Setting.boolSetting("index.force_memory_term_dictionary", false,
Property.IndexScope, Property.Deprecated);
static final String CODEC = "store";
static final int CORRUPTED_MARKER_CODEC_VERSION = 2;
// public is for test purposes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@
import org.elasticsearch.index.codec.CodecService;
import org.elasticsearch.index.engine.Segment;
import org.elasticsearch.index.mapper.MockFieldFilterPlugin;
import org.elasticsearch.index.store.Store;
import org.elasticsearch.index.translog.Translog;
import org.elasticsearch.indices.IndicesQueryCache;
import org.elasticsearch.indices.IndicesRequestCache;
Expand Down Expand Up @@ -439,10 +438,6 @@ protected Settings.Builder setRandomIndexSettings(Random random, Settings.Builde
RandomNumbers.randomIntBetween(random, 1, 15) + "ms");
}

if (randomBoolean()) {
builder.put(Store.FORCE_RAM_TERM_DICT.getKey(), true);
}

return builder;
}

Expand Down

0 comments on commit 3ce7a37

Please sign in to comment.