-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Fix getting replication type in NodeVersionAllocationDecider #12811
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
base: main
Are you sure you want to change the base?
Fix getting replication type in NodeVersionAllocationDecider #12811
Conversation
I don't have the permission to edit the labels of this PR. This PR is not related to Remote Store, so the label should be removed. I am not familiar with choosing the release target label, maybe label v2.13.1 can be added ? |
Removed the storage label. If you are targeting v2.15 release(next release), we can add the 2.15 label |
gaobinlong
left a comment
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.
I think we need to add some integration test cases to make sure this allocation decider works in a real cluster, we may add more test cases to ClusterAllocationExplainIT or SegmentReplicationAllocationIT.
By the way, changelog is needed for this change.
...ain/java/org/opensearch/cluster/routing/allocation/decider/NodeVersionAllocationDecider.java
Show resolved
Hide resolved
...c/test/java/org/opensearch/cluster/routing/allocation/NodeVersionAllocationDeciderTests.java
Show resolved
Hide resolved
|
This PR is stalled because it has been open for 30 days with no activity. |
|
This PR is stalled because it has been open for 30 days with no activity. |
|
@KunjueYu can you check @gaobinlong 's comments and help take the PR to closure |
I think the test cases in NodeVersionAllocationDeciderTests is enough to cover this case. |
Sorry for the lag. I have checked all the comments and added changlog. |
|
❕ Gradle check result for 964c881: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
Description
This PR fix incorrect way of getting replication type from node settings in org.opensearch.cluster.routing.allocation.decider.NodeVersionAllocationDecider. Instead, we should get the replication type from index meta data. Besides, I add a test which verifies that the primary shard can be allocated to a node with higher version when replication type is document.
Related Issues
Resolves #12744
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.