Skip to content

Commit

Permalink
nit updates
Browse files Browse the repository at this point in the history
Signed-off-by: Nicholas Walter Knize <[email protected]>
  • Loading branch information
nknize committed Nov 1, 2022
1 parent 52bcb09 commit 3abf9ef
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,14 +324,12 @@ public DiscoveryNode(StreamInput in) throws IOException {
for (int i = 0; i < rolesSize; i++) {
final String roleName = in.readString();
final String roleNameAbbreviation = in.readString();
final boolean canContainData;
canContainData = in.readBoolean();
final DiscoveryNodeRole role = roleMap.get(roleName);
if (role == null) {
if (in.getVersion().onOrAfter(Version.V_2_1_0)) {
roles.add(new DiscoveryNodeRole.DynamicRole(roleName, roleNameAbbreviation, canContainData));
roles.add(new DiscoveryNodeRole.DynamicRole(roleName, roleNameAbbreviation, in.readBoolean()));
} else {
roles.add(new DiscoveryNodeRole.UnknownRole(roleName, roleNameAbbreviation, canContainData));
roles.add(new DiscoveryNodeRole.UnknownRole(roleName, roleNameAbbreviation, in.readBoolean()));
}
} else {
assert roleName.equals(role.roleName()) : "role name [" + roleName + "] does not match role [" + role.roleName() + "]";
Expand Down

0 comments on commit 3abf9ef

Please sign in to comment.