-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Deprecate setting 'cluster.no_master_block' and introduce the alternative setting 'cluster.no_cluster_manager_block' #2453
Deprecate setting 'cluster.no_master_block' and introduce the alternative setting 'cluster.no_cluster_manager_block' #2453
Conversation
…_cluster_manager_block Signed-off-by: Tianli Feng <[email protected]>
Can one of the admins verify this patch? |
In log 3334:
It's reported in issue #2440 |
Signed-off-by: Tianli Feng <[email protected]>
"cluster.no_cluster_manager_block", | ||
NO_MASTER_BLOCK_SETTING, | ||
NoMasterBlockService::parseNoMasterBlock, | ||
Property.Dynamic, | ||
Property.NodeScope | ||
); | ||
|
||
private volatile ClusterBlock noMasterBlock; | ||
|
||
public NoMasterBlockService(Settings settings, ClusterSettings clusterSettings) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When are we targeting updating the language in places like these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the methods that published to maven as Java APIs, I think there are 2 paths.
- Replace the name for all of them in a future major version, which will can be tracked in issue Replace "master" terminology in Java APIs #1684.
- Create alternative methods and deprecate the existing methods. This is a normal path to deprecate Java APIs. Although I can make the change in separate PRs, there are too many methods with the term "master", it will be a huge effort.
I think a feasible way is to replace the "master" term in them all in a future major version, without adding @deprecate annotation and creating alternative methods. Besides, it's reasonable to choose a few common methods to follow the normal deprecation way to add alternative usages for them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As @mch2 noted below, I was referring to internal class and method names that include the master language. I agree that incorporating those changes would make the diff rather large. Can you create an issue to track this renaming, if there isn't one already? This can be implemented/committed independent of #1684
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the NoMasterBlockService
is published to Maven in jar file (https://opensearch.org/javadocs/1.2.4/OpenSearch/server/build/docs/javadoc/org/opensearch/cluster/coordination/NoMasterBlockService.html), so I thought it's not a internal method. However, seems there are few (or no) software is using APIs in this class.
There are so many classes like this one... I'm not sure if we should follow a normal deprecation path, or just rename.
In addition, there is a issue to track the renaming of internal class and method #1548, but I didn't scan and list all usages in detail.
...c/test/java/org/opensearch/cluster/coordination/NoMasterBlockServiceRenamedSettingTests.java
Outdated
Show resolved
Hide resolved
@@ -90,7 +90,7 @@ protected int numberOfReplicas() { | |||
public void testNoMasterActions() throws Exception { | |||
Settings settings = Settings.builder() | |||
.put(AutoCreateIndex.AUTO_CREATE_INDEX_SETTING.getKey(), true) | |||
.put(NoMasterBlockService.NO_MASTER_BLOCK_SETTING.getKey(), "all") | |||
.put(NoMasterBlockService.NO_CLUSTER_MANAGER_BLOCK_SETTING.getKey(), "all") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there something preventing us from updating NoMasterBlockService as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry just saw your response to kartg with the same question.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mch2 thanks for your review! Actually there is nothing blocked. The main reason not to change the class or method name in this PR is to control the size of the code changes in a single PR. Another reason is there are too many class or method that have been published to maven needs renaming, and I didn't target in version 2.0.0 for them.
…lock Signed-off-by: Tianli Feng <[email protected]>
…alue Signed-off-by: Tianli Feng <[email protected]>
In report 3434:
It's reported in #1703 |
In log 3437:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM assuming gradle check passes eventually 😄
Signed-off-by: Tianli Feng <[email protected]>
Description
cluster.no_cluster_manager_block
, aims to replace the existingcluster.no_master_block
cluster.no_master_block
as the fallback to the new settingcluster.no_master_block
Reference: commit 63c75d1 / PR #2221
Issues Resolved
Part of #1549
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.