opensearch-project / cross-cluster-replication

Synchronize your data across multiple clusters for lower latencies and higher availability
https://opensearch.org/docs/latest/replication-plugin/index/
Apache License 2.0
47 stars 57 forks source link

[Discuss] How ccr replicated index integrate with ism policy correctly #1364

Open wdongyu opened 4 months ago

wdongyu commented 4 months ago

What is the current behavior? I create some auto-follow tasks to replicate indices between two clusters, meanwhile I set up separate ISM policies to manage leader and follower indices.

The policy for follower indices transit to "delete" state in several days, obviously it will fail due to the block created by CCR:index [follower-000001] blocked by: [FORBIDDEN/1000/index read-only(cross-cluster-replication)]

What is the expected behavior? At present, leader indices will be deleted regularly but follower indices are not.

If CCR ease the limitation and allow follower indices to be deleted, another question comes: the follower indices will be created again due to the auto-follow tasks(because leader indices have not been deleted). So we need to confirm that matching leader indices have been already deleted before deleting the follower indices? That really confuses me.

So, what's the expected way to use CCR and ISM policy? Any help will be thankful

What is your host/environment?

wdongyu commented 4 months ago

I have found a better way from an ism issue that, if an "unfollow" action can be implemented, then ISM will check regularly if the ccr task is done(condition may include: leader indices are deleted or other). Once done, it will allow the follower cluster to stop the task, clean the cluster state and etc, and follower indices finally transit to "delete" state.

dblock commented 2 months ago

Catch All Triage - 1 2 3 4 5 6