Skip to content
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

Replace REST API request parameter "master_timeout" with "cluster_manager_timeout" in High Level REST Client when building requests #2928

Closed
4 tasks done
tlfeng opened this issue Apr 15, 2022 · 1 comment
Labels
deprecate enhancement Enhancement or improvement to existing feature or request v3.0.0 Issues and PRs related to version 3.0.0

Comments

@tlfeng
Copy link
Collaborator

tlfeng commented Apr 15, 2022

Is your feature request related to a problem? Please describe.
A part of issue #2511

A reasonable solution should be proposed to deal with the deprecation of parameter "master_timeout", while considering the compatibility for the High Level REST Client to communicate with server in different versions.

Problem:
In Server, the REST API request parameter "master_timeout" is deprecated and "cluster_manager_timeout" is added as an alternative, by the PRs listed in issue #2511 . There will be deprecation warning added in log file and HTTP response header when using the parameter "master_timeout" in REST API requests.

In High Level REST Client, parameter master_timeout was added to every applicable REST API call,
see org.opensearch.client.RequestConverters.Params.withMasterTimeout(TimeValue).

Emitting deprecation warning in log file and HTTP response header in this case will confuse the user, because the deprecated parameter is not actively used by the user.

Describe the solution you'd like

The adjusted plan for the REST API request parameter "master_timeout" deprecation.

  • In version 2.0:
    Server: add logic to accept new parameter "cluster_manager_timeout”, and no deprecation warning for the existing parameter "master_timeout"
    High Level REST Client: no change (maintains compatibility with 1.x and 2.x)
  • In version 3.0:
    Server: deprecate "master_timeout" and emit warning for usage
    High Level REST Client: change usage of "master_timeout" parameter to "cluster_manager_timeout" (still compatible with 2.x and 3.x)
  • In version 4.0:
    Server: remove support for "master_timeout"
    High Level REST Client: no change

Thanks @andrross for putting up the idea.

In this way, without changing the design for High Level REST Client of dealing with "master_timeout" parameter, the High Level REST Client can still be compatible with a previous version of the server. (High level Rest Client 2.x can be compatible with server 1.x and 2.x, and High level Rest Client 3.x can be compatible with server 2.x and 3.x)

Related code change:
In version >=2.0 and <3.0:

In version 3.0 and above:

Describe alternatives you've considered
none.

Additional context
none.

@tlfeng tlfeng added enhancement Enhancement or improvement to existing feature or request untriaged labels Apr 15, 2022
tlfeng pushed a commit that referenced this issue Apr 15, 2022
…'master_timeout' (#2920)

The plan of deprecation parameter "master_timeout" changed to not show deprecation warning of 'master_timeout' parameter in 2.x version, but start to emit warning from version 3.0 . 
For the detailed plan, see issue #2928.

Signed-off-by: Tianli Feng <ftianli@amazon.com>
opensearch-trigger-bot bot pushed a commit that referenced this issue Apr 15, 2022
…'master_timeout' (#2920)

The plan of deprecation parameter "master_timeout" changed to not show deprecation warning of 'master_timeout' parameter in 2.x version, but start to emit warning from version 3.0 .
For the detailed plan, see issue #2928.

Signed-off-by: Tianli Feng <ftianli@amazon.com>
(cherry picked from commit 8bc5765)
@tlfeng tlfeng added the v3.0.0 Issues and PRs related to version 3.0.0 label Apr 18, 2022
@tlfeng
Copy link
Collaborator Author

tlfeng commented Apr 21, 2022

All required changes for version 2.0 and 3.0 are completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecate enhancement Enhancement or improvement to existing feature or request v3.0.0 Issues and PRs related to version 3.0.0
Projects
None yet
Development

No branches or pull requests

2 participants