-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HLClient 6.7 does not work with prior 6.x versions #41647
Comments
Pinging @elastic/es-core-features |
Agreed with your analysis, the high-level REST client should not use new parameters added to existing API in a minor version as that breaks backwards compatibility. The underlying low-level client is not aware of the version of the nodes. Maybe a version based node selector could be used when newly added parameters are used, yet the 6.7 client could potentially be used against a cluster with no 6.7 nodes, in which case such calls won't work. I wonder if the parameter can be removed from these calls. |
I think we should default this parameter to null (using a Boolean instead of a boolean). My 2 cents. |
The rest client is supposed to be forward compatible, we have a note in the documentation regarding this behavior so I would not call this a bug: https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-high-compatibility.html#java-rest-high-compatibility |
Due to a change in 6.7 HLRest Client, FSCrawler ES6X distribution does not support anymore a version before 6.7. This probably won't be fixed as per discussion in elastic/elasticsearch#41647 so we need to document this breaking change. Closes #713
Thanks @jimczi. So the right way to upgrade an application in production would be:
You're right that this is documented. But it looks counter intuitive to me. The problem I have is that I'm building a 3rd party tool which is used by end users. I can't know in advance which elasticsearch server the end user will be using but I'm always trying to use the latest Elasticsearch REST Client version to benefit from all recent changes/fixes. When I switched to 6.7 client, that broke the compatibility for any user using an older version of elasticsearch.
I don't wish having to package all elasticsearch minor versions TBH. So my options are for now:
I chose to document this breaking change. Unless we decide to provide a more flexible client. Anyway as this is documented, I guess I can just close this issue. |
It is true that the most important compatibility aspect for the high level REST client is forward compatibility and that, as we document, it should be the last component to be upgraded. It is expected that e.g. the 6.7 client does not work fine against previous 6.x versions for what concerns APIs that have only been added in 6.7. I think it becomes more annoying if the client starts using in a minor version a new parameter that only 6.7 understands, especially for fundamental APIs like create index. I wonder how the other language clients handled this situation. Also, a different problem to keep in mind for the future: if we have bugfixes in the 6.7 client, we are forcing users to upgrade their cluster to 6.7 before they can upgrade their clients, which is odd. cc @hub-cap |
I believe that optional parameters are not passed to the REST interface. Here |
How do I upgrade from 6.1.1. to 7.3.0 then?
Is this the correct procedure? |
what sucks is your forward compatibility but not backward compatibility, what do you think ? |
@Tasselmi Please use more constructive language. You can communicate without being dismissive and insulting. |
The HLClient 6.7 now passes a parameter
include_type_name
when you for example create an index with (https://github.com/dadoonet/fscrawler/blob/master/elasticsearch-client/elasticsearch-client-v6/src/main/java/fr/pilato/elasticsearch/crawler/fs/client/v6/ElasticsearchClientV6.java#L232-L249):This is ok when you are running this against a 6.7 cluster but this new parameter is not supported by older elasticsearch versions.
I think that this parameter should be omitted if the elasticsearch server we are running is before 6.7.0 (not sure we are detecting that though).
I thought that a Client 6.x should be compatible to any 6.y server version.
Here the story is that users can't do a smooth upgrade of their application:
The text was updated successfully, but these errors were encountered: