Best approach for upgrading from 7.15 to say 8.5

I'm running 7.15 today (both ES & REST client). Is there a document suggesting how to upgrade to say ES 8.5?
We don't do instance upgrade. We use double write.
We will have both 7.15 & 8.5 clusters running during the transition where the applications will double write to both clusters.
Once the new cluster (8.5) is loaded with enough data, we then switch the reader from old 7.15 to new 8.5 cluster. Then stop the double write from applications and thenshutdown the old 7.15 cluster.
Our applications consist of both java and python.

With such operation, what is the proper way to migrate our code from REST to API?
Any pointers will be highly appreciated.
Thanks.

1 Like

On the client side, the best is to keep using the 7.x client with both ES 7.x and 8.x. The Java API client automatically sends headers that tell ES 8.x to work in 7.x compatible mode. With HLRC (High Level Rest Client), this has to be enabled explicitly.

The Java API client docs explain a migration scenario where HLRC is set in compatible mode and HLRC and Java API are used in the same application.

1 Like

setApiCompatibilityMode() doesn't register with my version 7.15. It seems I need to be at least version 7.16 to be able to use the REST to double write.

You can use the clients version 7.17 with a cluster version 7.15.

This will work without any issue, provided that you don't use features provided by the client that were introduced in Elasticsearch 7.16 or 7.17, as obviously the server version 7.15 will not understand them.

1 Like

How about python code? I forgot about to follow up on this.
Thanks.

I just changed my java code and it compiles fine. I could read the basic existing index info without issues. So thanks.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.