Skip to content
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

[BUG] Deserializing weighted routing metadata #4690

Closed
anshu1106 opened this issue Oct 6, 2022 · 0 comments
Closed

[BUG] Deserializing weighted routing metadata #4690

anshu1106 opened this issue Oct 6, 2022 · 0 comments
Labels
bug Something isn't working Indexing & Search

Comments

@anshu1106
Copy link
Contributor

anshu1106 commented Oct 6, 2022

Describe the bug
Deserialization of weighted routing metadata is failing on process restart.

To Reproduce
Steps to reproduce the behavior:

  1. For a multi az domain, set weighted routing weights using curl command curl -X PUT "localhost:9200/_cluster/routing/awareness/zone/weights" -H 'Content-Type: application/json' -d '{"us-east-1c" : "1", "us-east-1b":"0", "us-east-1d":"1"}'
  2. Restart OS process on one of the data nodes
  3. OS process restart fails with error :
[2022-10-03T13:29:58,597][ERROR][o.o.b.Bootstrap          ] [e8461910d5468d3abde9e564f23da1c3] Exception
OpenSearchParseException[failed to parse wrr metadata  [us-east-1d], expected object]
        at org.opensearch.cluster.metadata.WeightedRoundRobinRoutingMetadata.fromXContent(WeightedRoundRobinRoutingMetadata.java:110)
        at org.opensearch.common.xcontent.NamedXContentRegistry$Entry.lambda$new$0(NamedXContentRegistry.java:76)
        at org.opensearch.common.xcontent.NamedXContentRegistry.parseNamedObject(NamedXContentRegistry.java:166)
        at org.opensearch.common.xcontent.support.AbstractXContentParser.namedObject(AbstractXContentParser.java:435)
        at org.opensearch.cluster.metadata.Metadata$Builder.fromXContent(Metadata.java:1784)
        at org.opensearch.gateway.PersistedClusterStateService.lambda$loadOnDiskState$1(PersistedClusterStateService.java:443)
        at org.opensearch.gateway.PersistedClusterStateService.consumeFromType(PersistedClusterStateService.java:507)
        at org.opensearch.gateway.PersistedClusterStateService.loadOnDiskState(PersistedClusterStateService.java:442)
        at org.opensearch.gateway.PersistedClusterStateService.loadBestOnDiskState(PersistedClusterStateService.java:367)
        at org.opensearch.gateway.GatewayMetaState.start(GatewayMetaState.java:164)
        at org.opensearch.node.Node.start(Node.java:1087)
        at org.opensearch.bootstrap.Bootstrap.start(Bootstrap.java:339)
        at org.opensearch.bootstrap.Bootstrap.init(Bootstrap.java:421)
        at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:179)
        at org.opensearch.bootstrap.OpenSearch.execute(OpenSearch.java:170)
        at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:100)
        at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)
        at org.opensearch.cli.Command.main(Command.java:101)
        at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:136)
        at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:102)
[2022-10-03T13:29:58,598][ERROR][o.o.b.OpenSearchUncaughtExceptionHandler] [e8461910d5468d3abde9e564f23da1c3] uncaught exception in thread [main]
OpenSearchParseException[failed to parse wrr metadata  [us-east-1d], expected object]
        at org.opensearch.cluster.metadata.WeightedRoundRobinRoutingMetadata.fromXContent(WeightedRoundRobinRoutingMetadata.java:110)
        at org.opensearch.common.xcontent.NamedXContentRegistry$Entry.lambda$new$0(NamedXContentRegistry.java:76)
        at org.opensearch.common.xcontent.NamedXContentRegistry.parseNamedObject(NamedXContentRegistry.java:166)
        at org.opensearch.common.xcontent.support.AbstractXContentParser.namedObject(AbstractXContentParser.java:435)
        at org.opensearch.cluster.metadata.Metadata$Builder.fromXContent(Metadata.java:1784)
        at org.opensearch.gateway.PersistedClusterStateService.lambda$loadOnDiskState$1(PersistedClusterStateService.java:443)
        at org.opensearch.gateway.PersistedClusterStateService.consumeFromType(PersistedClusterStateService.java:507)
        at org.opensearch.gateway.PersistedClusterStateService.loadOnDiskState(PersistedClusterStateService.java:442)
        at org.opensearch.gateway.PersistedClusterStateService.loadBestOnDiskState(PersistedClusterStateService.java:367)
        at org.opensearch.gateway.GatewayMetaState.start(GatewayMetaState.java:164)
        at org.opensearch.node.Node.start(Node.java:1087)
        at org.opensearch.bootstrap.Bootstrap.start(Bootstrap.java:339)
        at org.opensearch.bootstrap.Bootstrap.init(Bootstrap.java:421)
        at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:179)
        at org.opensearch.bootstrap.OpenSearch.execute(OpenSearch.java:170)
        at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:100)
        at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)
        at org.opensearch.cli.Command.main(Command.java:101)
        at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:136)
        at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:102)

Expected behavior
Process restart shouldn't fail.

Host/Environment (please complete the following information):

  • OS: macOS 12.5.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Indexing & Search
Projects
None yet
Development

No branches or pull requests

3 participants