Regarding client and server version alignment

We discovered through MissingRequiredPropertyException in PIT query · Issue #921 · elastic/elasticsearch-java · GitHub that even minor version mismatches between the Elasticsearch server and client can lead to issues.

Based on this, the general guidance is to align the client and server versions as closely as possible for maximum compatibility.

our main goal is for the client to match the current server version as close as possible.

However, it’s not always feasible to match versions, since some server releases do not have a corresponding client version. This is especially true for certain minor or patch releases.

“Closely as possible” is also relative, because for our use case it caused the defect.

For example, there is a server release for 8.19.5 but no client release. At least not yet.

Although for this specific example, it may be due to timings, we also observed this in past versions.

What is the most up-to-date recommendation regarding version alignment between the Elasticsearch server and client?

One possible solution would be to guarantee that every version, regardless of how minor, includes a release for both the client and the server, but I ignore if you decided not to do that intentionally or what the strategy is.

Any clarification would help

Thanks!

Hello @yeikel !

That statement is valid in the context of backwards compatibility: if the server adds a new non optional parameter to a query and the client adds support for it, that version of the client will not be compatible with previous versions of the server which do not send that parameter. Forward compatibility is guaranteed up to the following minor version, so version 8.19.4 of the client is guaranteed to be compatible with versions of the server 8.19.x where x is >= 4.

Since version 9 of the java client we’re more independent with releases: minor and major versions will be synchronized with the server, while patches will probably happen more frequently. In this case, 8.19.5 is waiting for a bug fix and will be out soon, sorry for the delay!

1 Like

Hi @ltrotta

Thank you for the detailed response. We’ll keep it in mind

Could you please share any link to the official documentation that documents this?

If not, I’ll link my internal docs to this thread! :slight_smile:

It’s part of the compatibility section of the readme, I’ll add the note about patches there :slight_smile: