Support of CCR for migration to a new Opensearch version

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): 2.11 and above

Describe the issue: Can CCR be used to migrate data from older version of OpenSearch to a new one using Blue Green Deployment ? If so, then how do we know CCR is supported between which OpenSearch versions. Is this information officially available some where in OpenSearch Release Notes or other internal/external documentation. In the abscence of this information how can we get assurance that zero data loss upgrade of OpenSearch can be performed in real time without stopping or buffering the OpenSearch traffic data

Configuration:

Relevant Logs or Screenshots:

@farman Can you take a look at this GitHub issue? A similar question was raised and answered there.

Thanks I looked at it.

I am exploring the possibility of using CCR for upgrading from one OpenSearch version to another. In this regard it will be very beneficial to have the compatibility matrix between different OpenSearch versions where CCR is possible.
I have also read that CCR will work if the source and target clusters are in the same major version or if target cluster is in the immediate next version as compared to the source cluster (e.g. source in 2.X and target in 3.X). Is it correct?

@farman As per that GitHub issue, having a source with a lower version than the target can cause the error.
I would suggest first upgrading the source and then following the target.

@pablo Trying to map to CCR terminology, when you say “source” do you mean the “follower” cluster and when you say “target” , then, the “leader” cluster. If so, then it makes sense because as I have read that Lucene indices are backwards compatible (not forward compatible). So, if I have 2 clusters on versions 2.19 and 3.0, then it will still be possible for 3.0 cluster(having higher underlying Lucene version) to read data from opensearch 2.19 cluster(having lower underlying Lucene version).

@farman Apologies for the misleading terminology. That is correct, source = leader and target = follower.

@pablo OK, thanks.

So then as I understand, when we say “Source” we refer to the cluster which provides the source of data, in case of CCR that should be the “leader cluster”.
Similarly when we say “Target”, we refer to the cluster where data will be replicated, in case of CCR that should be the “follower cluster”.

Since CCR uses a “pull” mechanism, i.e., “follower” pulls data from “leader”. And because it is possible for higher version Lucene Index (present in newer version of OpenSearch) to read data from a lower version of Lucene indices (present in older version of OpenSearch), therefore, ideally follower should be on a higher version of OpenSearch than leader which implies that “Target Cluster” should be on a higher version that “Source Cluster”, right?

@farman I’ve just re-read my last statement. Your approach is correct; the follower must be upgraded first, and then the leader must follow the upgrade. Lucene isn’t forward-compatible.

One comment here, this is correct as long as CCR is unidirectional.