You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to a bug in deserialization where attributeName is set to null if not present, a NPE is seen.
Caused by: java.lang.NullPointerException: Cannot invoke "String.length()" because "str" is null
at org.opensearch.core.common.io.stream.StreamOutput.writeString(StreamOutput.java:443)
at org.opensearch.cluster.routing.WeightedRouting.writeTo(WeightedRouting.java:55)
at org.opensearch.cluster.metadata.WeightedRoutingMetadata.writeTo(WeightedRoutingMetadata.java:91)
at org.opensearch.core.common.io.stream.StreamOutput.writeNamedWriteable(StreamOutput.java:1126)
at org.opensearch.cluster.metadata.Metadata.writeTo(Metadata.java:1145)
at org.opensearch.cluster.ClusterState.writeTo(ClusterState.java:783)
at org.opensearch.cluster.coordination.PublicationTransportHandler.lambda$serializeFullClusterState$2(PublicationTransportHandler.java:240)
at org.opensearch.cluster.coordination.CompressedStreamUtils.createCompressedStream(CompressedStreamUtils.java:42)
at org.opensearch.cluster.coordination.PublicationTransportHandler.serializeFullClusterState(PublicationTransportHandler.java:238)
at org.opensearch.cluster.coordination.PublicationTransportHandler$PublicationContext.buildDiffAndSerializeStates(PublicationTransportHandler.java:287)
at org.opensearch.cluster.coordination.PublicationTransportHandler.newPublicationContext(PublicationTransportHandler.java:233)
at org.opensearch.cluster.coordination.Coordinator.publish(Coordinator.java:1312)
Related component
Search
To Reproduce
Create a 1 or 2 node domain and add weighted round robin weights.
Describe the bug
When weighted round robin weights is deleted for a domain, the weighted routing metadata is set to empty in the cluster state.
Weighted Routing Metadata with weights
Weighted Routing Metadata after weights deletion
Due to a bug in deserialization where attributeName is set to null if not present, a NPE is seen.
Related component
Search
To Reproduce
Expected behavior
After removal of weights there should not be any failure in the code
Additional Details
Plugins
Please list all plugins currently enabled.
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: