Skip to content

Commit a3900cd

Browse files
Adding new actiontype for unfollow replication through ism plugin
Signed-off-by: aggarwalShivani <shivani.aggarwal@nokia.com>
1 parent 54c8310 commit a3900cd

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

src/main/kotlin/org/opensearch/commons/replication/ReplicationPluginInterface.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ package org.opensearch.commons.replication
77
import org.opensearch.action.support.master.AcknowledgedResponse
88
import org.opensearch.client.node.NodeClient
99
import org.opensearch.commons.replication.action.StopIndexReplicationRequest
10-
import org.opensearch.commons.replication.action.ReplicationActions.STOP_REPLICATION_ACTION_TYPE
10+
import org.opensearch.commons.replication.action.ReplicationActions.UNFOLLOW_REPLICATION_ACTION_TYPE
1111
import org.opensearch.commons.utils.recreateObject
1212
import org.opensearch.core.action.ActionListener
1313
import org.opensearch.core.action.ActionResponse
1414
import org.opensearch.core.common.io.stream.Writeable
1515

1616

1717
/**
18-
* All the transport action plugin interfaces for the cross-cluster-replication plugin.
18+
* Transport action plugin interfaces for the cross-cluster-replication plugin.
1919
*/
2020
object ReplicationPluginInterface {
2121

@@ -32,7 +32,7 @@ object ReplicationPluginInterface {
3232
listener: ActionListener<AcknowledgedResponse>
3333
) {
3434
return client.execute(
35-
STOP_REPLICATION_ACTION_TYPE,
35+
UNFOLLOW_REPLICATION_ACTION_TYPE,
3636
request,
3737
wrapActionListener(listener) { response ->
3838
recreateObject(response) {

src/main/kotlin/org/opensearch/commons/replication/action/ReplicationActions.kt

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,25 @@ import org.opensearch.action.ActionType
88
import org.opensearch.action.support.master.AcknowledgedResponse
99

1010
/**
11-
* All the transport action information for the Replication plugin
11+
* Information related to the transport stop replication action for the Replication plugin
1212
*/
1313
object ReplicationActions {
1414

1515
/**
16-
* Stop replication. Internal only - Inter plugin communication.
16+
* Action names for stopping replication
17+
* STOP_REPLICATION_ACTION_NAME: action used for _stop REST API
18+
* UNFOLLOW_REPLICATION_ACTION_NAME: internal action used for inter-plugin communication i.e. by ism to invoke stop
19+
* replication.
1720
*/
18-
const val STOP_REPLICATION_NAME = "indices:admin/plugins/replication/index/stop"
19-
const val STOP_REPLICATION_BASE_ACTION_NAME = "indices:admin/plugins/replication/index/unfollow"
21+
const val STOP_REPLICATION_ACTION_NAME = "indices:admin/plugins/replication/index/stop"
22+
const val UNFOLLOW_REPLICATION_ACTION_NAME = "indices:admin/plugins/replication/index/unfollow"
2023

2124
/**
22-
* Stop replication transport action type. Internal only - Inter plugin communication.
25+
* Stop replication transport action types.
2326
*/
2427
val STOP_REPLICATION_ACTION_TYPE =
25-
ActionType(STOP_REPLICATION_NAME, ::AcknowledgedResponse)
28+
ActionType(STOP_REPLICATION_ACTION_NAME, ::AcknowledgedResponse)
29+
val UNFOLLOW_REPLICATION_ACTION_TYPE =
30+
ActionType(UNFOLLOW_REPLICATION_ACTION_NAME, ::AcknowledgedResponse)
2631

2732
}

0 commit comments

Comments
 (0)