Skip to content

Commit 242e9e5

Browse files
author
liuyongheng
committed
Rmote index name using the remote_ prefix instead of _remote suffix when the convert_index_to_remote operation restored the target index .
1 parent 4ef0f4f commit 242e9e5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/restore/AttemptRestoreStep.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class AttemptRestoreStep(private val action: ConvertIndexToRemoteAction) : Step(
9191
.indices(indexName)
9292
.storageType(RestoreSnapshotRequest.StorageType.REMOTE_SNAPSHOT)
9393
.renamePattern("^(.*)\$")
94-
.renameReplacement("$1_remote")
94+
.renameReplacement("remote_$1")
9595
.waitForCompletion(false)
9696
val response: RestoreSnapshotResponse = context.client.admin().cluster().suspendUntil {
9797
restoreSnapshot(restoreSnapshotRequest, it)

src/test/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/ConvertIndexToRemoteActionIT.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class ConvertIndexToRemoteActionIT : IndexStateManagementRestTestCase() {
113113
)
114114
}
115115

116-
val remoteIndexName = "${indexName}_remote"
116+
val remoteIndexName = "remote_$indexName"
117117
waitFor { assertIndexExists(remoteIndexName) }
118118

119119
val isRemote = isIndexRemote(remoteIndexName)

0 commit comments

Comments
 (0)