Skip to content

Commit

Permalink
Remove additionalSettings
Browse files Browse the repository at this point in the history
Per opensearch-project/OpenSearch#9392, mmap will be
a default setting for all lucene segment files

Signed-off-by: Heemin Kim <[email protected]>
  • Loading branch information
heemin32 committed Jul 29, 2024
1 parent 52636c4 commit 83412da
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions src/main/java/org/opensearch/knn/plugin/KNNPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -354,25 +354,4 @@ public List<NamedXContentRegistry.Entry> getNamedXContent() {
public Collection<SystemIndexDescriptor> getSystemIndexDescriptors(Settings settings) {
return ImmutableList.of(new SystemIndexDescriptor(MODEL_INDEX_NAME, "Index for storing models used for k-NN indices"));
}

/**
* Plugin can provide additional node settings, that includes new settings or overrides for existing one from core.
*
* @return settings that are set by plugin
*/
@Override
public Settings additionalSettings() {
// We add engine specific extensions to the core list for HybridFS store type. We read existing values
// and append ours because in core setting will be replaced by override.
// Values are set as cluster defaults and are used at index creation time. Index specific overrides will take priority over values
// that are set here.
final List<String> engineSettings = Arrays.stream(KNNEngine.values())
.flatMap(engine -> engine.mmapFileExtensions().stream())
.collect(Collectors.toList());
final List<String> combinedSettings = Stream.concat(
IndexModule.INDEX_STORE_HYBRID_MMAP_EXTENSIONS.getDefault(Settings.EMPTY).stream(),
engineSettings.stream()
).collect(Collectors.toList());
return Settings.builder().putList(IndexModule.INDEX_STORE_HYBRID_MMAP_EXTENSIONS.getKey(), combinedSettings).build();
}
}

0 comments on commit 83412da

Please sign in to comment.