Skip to content

Commit 3ce7a37

Browse files
authored
Remove index.force_memory_term_dictionary setting (#48873)
This temporary setting was introduced in #39741 but has had no effect since it was deprecated in #42838. This commit removes this setting.
1 parent 72fe9ce commit 3ce7a37

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed
Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
[float]
22
[[breaking_80_indices_changes]]
3-
=== Force Merge API changes
3+
=== Indices changes
4+
5+
[float]
6+
==== Force Merge API changes
47

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

1013
The Force Merge API now rejects requests that have a `max_num_segments` greater
1114
than or equal to 0 when the `only_expunge_deletes` is set to true.
15+
16+
[float]
17+
==== On-disk term dictionary cannot be disabled
18+
19+
The `index.force_memory_term_dictionary` setting was introduced in 7.0 as a
20+
temporary measure to allow users to opt-out of the optimization that leaves the
21+
term dictionary on disk when appropriate. This optimization is now mandatory
22+
and the setting is removed.

server/src/main/java/org/elasticsearch/common/settings/IndexScopedSettings.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ public final class IndexScopedSettings extends AbstractScopedSettings {
158158
IndexModule.INDEX_STORE_PRE_LOAD_SETTING,
159159
IndexModule.INDEX_QUERY_CACHE_ENABLED_SETTING,
160160
FsDirectoryFactory.INDEX_LOCK_FACTOR_SETTING,
161-
Store.FORCE_RAM_TERM_DICT,
162161
EngineConfig.INDEX_CODEC_SETTING,
163162
IndexMetaData.SETTING_WAIT_FOR_ACTIVE_SHARDS,
164163
IndexSettings.DEFAULT_PIPELINE,

server/src/main/java/org/elasticsearch/index/store/Store.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,6 @@
128128
* </pre>
129129
*/
130130
public class Store extends AbstractIndexShardComponent implements Closeable, RefCounted {
131-
/**
132-
* This is an escape hatch for lucenes internal optimization that checks if the IndexInput is an instance of ByteBufferIndexInput
133-
* 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.
134-
* Since this optimization has been added very late in the release processes we add this setting to allow users to opt-out of
135-
* this by exploiting lucene internals and wrapping the IndexInput in a simple delegate.
136-
*/
137-
public static final Setting<Boolean> FORCE_RAM_TERM_DICT = Setting.boolSetting("index.force_memory_term_dictionary", false,
138-
Property.IndexScope, Property.Deprecated);
139131
static final String CODEC = "store";
140132
static final int CORRUPTED_MARKER_CODEC_VERSION = 2;
141133
// public is for test purposes

test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@
105105
import org.elasticsearch.index.codec.CodecService;
106106
import org.elasticsearch.index.engine.Segment;
107107
import org.elasticsearch.index.mapper.MockFieldFilterPlugin;
108-
import org.elasticsearch.index.store.Store;
109108
import org.elasticsearch.index.translog.Translog;
110109
import org.elasticsearch.indices.IndicesQueryCache;
111110
import org.elasticsearch.indices.IndicesRequestCache;
@@ -439,10 +438,6 @@ protected Settings.Builder setRandomIndexSettings(Random random, Settings.Builde
439438
RandomNumbers.randomIntBetween(random, 1, 15) + "ms");
440439
}
441440

442-
if (randomBoolean()) {
443-
builder.put(Store.FORCE_RAM_TERM_DICT.getKey(), true);
444-
}
445-
446441
return builder;
447442
}
448443

0 commit comments

Comments
 (0)