From dd90f13b040480fc5877c39eb6d047f680abea5b Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Tue, 18 Apr 2023 10:29:53 +0530 Subject: [PATCH] Add setting to use document replication for system indices. (#802) (#804) Signed-off-by: Rishikesh1159 (cherry picked from commit 55b6968af90d739d8448c5d88ed5204a240d0f86) Co-authored-by: Rishikesh Pasham <62345295+Rishikesh1159@users.noreply.github.com> --- .../replication/metadata/store/ReplicationMetadataStore.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/kotlin/org/opensearch/replication/metadata/store/ReplicationMetadataStore.kt b/src/main/kotlin/org/opensearch/replication/metadata/store/ReplicationMetadataStore.kt index ba0122ee..18a0cd6c 100644 --- a/src/main/kotlin/org/opensearch/replication/metadata/store/ReplicationMetadataStore.kt +++ b/src/main/kotlin/org/opensearch/replication/metadata/store/ReplicationMetadataStore.kt @@ -40,6 +40,7 @@ import org.opensearch.common.xcontent.LoggingDeprecationHandler import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentParser +import org.opensearch.indices.replication.common.ReplicationType import org.opensearch.replication.util.suspendExecuteWithRetries class ReplicationMetadataStore constructor(val client: Client, val clusterService: ClusterService, @@ -265,6 +266,7 @@ class ReplicationMetadataStore constructor(val client: Client, val clusterServic .put(IndexMetadata.INDEX_AUTO_EXPAND_REPLICAS_SETTING.key, "0-1") .put(IndexMetadata.INDEX_PRIORITY_SETTING.key, Int.MAX_VALUE) .put(IndexMetadata.INDEX_HIDDEN_SETTING.key, true) + .put(IndexMetadata.INDEX_REPLICATION_TYPE_SETTING.key, ReplicationType.DOCUMENT) // System Indices should use Document Replication strategy .build() }