Fix getting replication type in NodeVersionAllocationDecider#12811
Fix getting replication type in NodeVersionAllocationDecider#12811KunjueYu wants to merge 4 commits intoopensearch-project:mainfrom
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.
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.