-
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
Add a new node role 'search' which is dedicated to provide search capability #4689
Add a new node role 'search' which is dedicated to provide search capability #4689
Conversation
Signed-off-by: Tianli Feng <ftianli@amazon.com>
Signed-off-by: Tianli Feng <ftianli@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
…archer Signed-off-by: Tianli Feng <ftianli@amazon.com> # Conflicts: # CHANGELOG.md
d079bd3
to
017b202
Compare
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Tianli Feng <ftianli@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Tianli Feng <ftianli@amazon.com>
…archer Signed-off-by: Tianli Feng <ftianli@amazon.com> # Conflicts: # CHANGELOG.md
Signed-off-by: Tianli Feng <ftianli@amazon.com>
if (nodeVersion.onOrAfter(Version.V_2_4_0)) { | ||
return this; | ||
} else { | ||
return DiscoveryNodeRole.DATA_ROLE; |
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.
Do we necessarily need a fallback?
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.
Let me check what will be like when there is no fallback. So far I think without the fallback, the new role will be taken as "UnknownRole" when communicating with node in older versions, but I need to figure out the impact.
OpenSearch/server/src/main/java/org/opensearch/cluster/node/DiscoveryNodeRole.java
Line 314 in 00fb2b7
static class UnknownRole extends DiscoveryNodeRole { |
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 removed the fallback in the latest commit 9a05a90.
Looks like nothing wrong without the fallback for the new role.
I started 2 nodes to form a cluster.
In 3.0.0 node:
$ curl -XGET "http://localhost:9201/_cat/nodes?v&pretty"
ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role node.roles cluster_manager name
127.0.0.1 19 17 0 0.09 0.15 0.09 s search - node-3.0
127.0.0.1 61 17 0 0.09 0.15 0.09 dm data,master * node-2.4
In 2.4.0 node:
$ curl -XGET "http://localhost:9200/_cat/nodes?v&pretty"
ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role node.roles cluster_manager name
127.0.0.1 18 17 0 0.04 0.15 0.08 - search - node-3.0
127.0.0.1 60 17 0 0.04 0.15 0.08 dm data,master * node-2.4
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
…archer Signed-off-by: Tianli Feng <ftianli@amazon.com>
Signed-off-by: Tianli Feng <ftianli@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
@@ Coverage Diff @@
## main #4689 +/- ##
============================================
+ Coverage 70.59% 70.81% +0.21%
- Complexity 57514 57582 +68
============================================
Files 4660 4660
Lines 276466 276470 +4
Branches 40285 40285
============================================
+ Hits 195170 195780 +610
+ Misses 65060 64421 -639
- Partials 16236 16269 +33
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-4689-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 c1272c181e6bd96d1db725dfbbcd5ac8e6058502
# Push it to GitHub
git push --set-upstream origin backport/backport-4689-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x Then, create a pull request where the |
…ability (opensearch-project#4689) Signed-off-by: Tianli Feng <ftianli@amazon.com>
…ability (opensearch-project#4689) Signed-off-by: Tianli Feng <ftianli@amazon.com>
Description
Add a new node role which is dedicated to provide search capability.
The role name is
search
.Issues Resolved
Resolve #4652
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.