Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Lakshya Taragi <lakshya.taragi@gmail.com>
  • Loading branch information
ltaragi committed Apr 11, 2024
1 parent 31ee71b commit e8d6798
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1012,8 +1012,8 @@ public static void updateReplicationStrategy(
indexReplicationType = INDEX_REPLICATION_TYPE_SETTING.get(requestSettings);
} else if (combinedTemplateSettings != null && INDEX_REPLICATION_TYPE_SETTING.exists(combinedTemplateSettings)) {
indexReplicationType = INDEX_REPLICATION_TYPE_SETTING.get(combinedTemplateSettings);
} else if (CLUSTER_REPLICATION_TYPE_SETTING.exists(nodeSettings)) {
indexReplicationType = CLUSTER_REPLICATION_TYPE_SETTING.get(nodeSettings);
} else if (clusterSettings.get(CLUSTER_REPLICATION_TYPE_SETTING) != null) {
indexReplicationType = clusterSettings.get(CLUSTER_REPLICATION_TYPE_SETTING);
} else if (isRemoteDataAttributePresent(nodeSettings) || isMigratingToRemoteStore(clusterSettings)) {
indexReplicationType = ReplicationType.SEGMENT;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -685,12 +685,19 @@ private Settings getOverrideSettingsInternal() {
settingsBuilder,
request.indexSettings(),
clusterService.getSettings(),
null
null,
clusterSettings
);
}
// remote store settings needs to be overridden if the remote store feature is enabled in the
// cluster where snapshot is being restored.
MetadataCreateIndexService.updateRemoteStoreSettings(settingsBuilder, clusterService.getSettings());
MetadataCreateIndexService.updateRemoteStoreSettings(
settingsBuilder,
clusterService.state(),
clusterSettings,
clusterService.getSettings(),
request.getDescription()
);
return settingsBuilder.build();
}

Expand Down

0 comments on commit e8d6798

Please sign in to comment.