cross-cluster-replication icon indicating copy to clipboard operation
cross-cluster-replication copied to clipboard

[Feature request] Stop replication for all indices

Open BlackMetalz opened this issue 2 years ago • 5 comments

Is your feature request related to a problem? Please describe. Detail problem in here: https://discuss.opendistrocommunity.dev/t/several-question-related-to-cross-cluster-replication-awesome-feature-of-opensearch/8991 TLDR: CCR doesn't have an API to stop all replication Version: 1.3

Describe the solution you'd like I want to have an API to stop all replication for "easier" automation for recovery :grin:

Additional context For example, I'm trying to set up 2 cluster types active-passive. In case the whole active cluster dies, I would trigger an API to stop whole replication on the passive cluster so the application can write into passive cluster which is just promoted to active

Note: Maybe my solution is not good enough, if you have a better solution for automation / HA for it, please tell xD

BlackMetalz avatar Mar 28 '22 10:03 BlackMetalz

The title here just says feature request. @BlackMetalz would you be okay updating it to be a bit more descriptive? Maybe something like "Stop all replication API"?

elfisher avatar Apr 21 '22 12:04 elfisher

Thanks @BlackMetalz

Will pattern based (ex: * in this case) support for _stop API resolves the issue?

  • The API should give additional details on partial success/failures in stopping replication for the indices.

saikaranam-amazon avatar Apr 21 '22 14:04 saikaranam-amazon

@elfisher @saikaranam-amazon

Yes. I'm talking about a feature for stopping all replication APIs. For example, if I have over 500 indices and replicated them to the secondary cluster. For some bad cases which is the whole main cluster die and I have to promote the secondary cluster to make data safe. Of course, I have to disable replication to their indices so all indices in the second cluster can writeable. So an API to stop all replication would be easier than write own script for the loop and stopping all over indices xD.

BlackMetalz avatar Apr 21 '22 16:04 BlackMetalz

Removed v2.1.0 tag as the feature is still under scoping.

manishdev-amzn avatar May 18 '22 08:05 manishdev-amzn

Not planning to support due to reasons mentioned in https://github.com/opensearch-project/cross-cluster-replication/issues/379

ankitkala avatar Aug 18 '22 13:08 ankitkala