Skip to content

Commit 4717b9b

Browse files
committed
fixed PR comments
Signed-off-by: Vinay Krishna Pudyodu <[email protected]>
1 parent 75838a5 commit 4717b9b

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
## [Unreleased 2.x]
77
### Added
88
- Renaming the node role search to warm ([#17573](https://github.com/opensearch-project/OpenSearch/pull/17573))
9-
- Introduce a new search node role ([#17620](https://github.com/opensearch-project/OpenSearch/pull/17620))
9+
- Introduce a new search node role to hold search only shards ([#17620](https://github.com/opensearch-project/OpenSearch/pull/17620))
1010

1111
### Dependencies
1212
- Bump `ch.qos.logback:logback-core` from 1.5.16 to 1.5.17 ([#17609](https://github.com/opensearch-project/OpenSearch/pull/17609))

server/src/main/java/org/opensearch/cluster/node/DiscoveryNodeRole.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,14 +317,14 @@ public Setting<Boolean> legacySetting() {
317317

318318
@Override
319319
public Setting<Boolean> legacySetting() {
320-
// warm role is added in 3.0 so doesn't need to configure legacy setting
320+
// search role is added in 2.4 so doesn't need to configure legacy setting
321321
return null;
322322
}
323323

324324
@Override
325325
public void validateRole(List<DiscoveryNodeRole> roles) {
326326
for (DiscoveryNodeRole role : roles) {
327-
if (!role.equals(DiscoveryNodeRole.SEARCH_ROLE)) {
327+
if (role.equals(DiscoveryNodeRole.SEARCH_ROLE) == false) {
328328
throw new IllegalArgumentException(
329329
String.format(
330330
Locale.ROOT,

server/src/test/java/org/opensearch/node/NodeRoleSettingsTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ public void testClusterManagerAndDataNodeRoles() {
4848
* Validate search role cannot coexist with any other role on a node.
4949
*/
5050
public void testSearchRoleCannotCoExistWithAnyOtherRole() {
51-
DiscoveryNode.setDeprecatedMasterRole();
5251
Settings roleSettings = Settings.builder().put(NodeRoleSettings.NODE_ROLES_SETTING.getKey(), "search, test_role").build();
5352
Exception exception = expectThrows(IllegalArgumentException.class, () -> NodeRoleSettings.NODE_ROLES_SETTING.get(roleSettings));
5453
assertThat(exception.getMessage(), containsString("search role cannot be combined with any other role on a node."));

0 commit comments

Comments
 (0)