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
Describe the bug
Remote cluster state download/restore is failing for Data stream. It throws the NPE and kills the process. It is able to sucessfully download the global metadata and index metadata seperatly, it is failing when we combine both in Single Metadata to return. Index Metadata which we got from remote is map of (index uuid -> index metadata). During building metadata of data stream, it finds the index metadata using index name in indices map, which returns null and causes NPE.
[2023-10-19T10:39:18,292][ERROR][o.o.b.Bootstrap ] [2e85817919de4d9540903aefd5bf46f1] Exception
java.lang.IllegalStateException: Unable to restore remote index metadata
at org.opensearch.index.recovery.RemoteStoreRestoreService.restore(RemoteStoreRestoreService.java:154)
at org.opensearch.gateway.GatewayMetaState.start(GatewayMetaState.java:178)
at org.opensearch.node.Node.start(Node.java:1444)
at org.opensearch.bootstrap.Bootstrap.start(Bootstrap.java:339)
at org.opensearch.bootstrap.Bootstrap.init(Bootstrap.java:413)
at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:180)
at org.opensearch.bootstrap.OpenSearch.execute(OpenSearch.java:171)
at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:104)
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:137)
at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:103)
Caused by: java.lang.NullPointerException
at java.base/java.util.Objects.requireNonNull(Objects.java:208)
at java.base/java.util.ImmutableCollections$List12.<init>(ImmutableCollections.java:556)
at java.base/java.util.List.of(List.java:1043)
at java.base/java.util.ImmutableCollections.listCopy(ImmutableCollections.java:172)
at java.base/java.util.List.copyOf(List.java:1068)
at org.opensearch.cluster.metadata.IndexAbstraction$DataStream.<init>(IndexAbstraction.java:348)
at org.opensearch.cluster.metadata.Metadata$Builder.buildIndicesLookup(Metadata.java:1652)
at org.opensearch.cluster.metadata.Metadata$Builder.buildMetadataWithRecomputedIndicesLookups(Metadata.java:1601)
at org.opensearch.cluster.metadata.Metadata$Builder.build(Metadata.java:1489)
at org.opensearch.gateway.remote.RemoteClusterStateService.getLatestMetadata(RemoteClusterStateService.java:734)
at org.opensearch.index.recovery.RemoteStoreRestoreService.restore(RemoteStoreRestoreService.java:149)
... 11 more
Fix
Index Metadata we get from remote store is map of (Index uuid -> Index Metadata). We need to convert it to (Index name -> Index Metadata).
Describe the bug
Remote cluster state download/restore is failing for Data stream. It throws the NPE and kills the process. It is able to sucessfully download the global metadata and index metadata seperatly, it is failing when we combine both in Single Metadata to return. Index Metadata which we got from remote is map of (index uuid -> index metadata). During building metadata of data stream, it finds the index metadata using index name in indices map, which returns null and causes NPE.
Fix
Index Metadata we get from remote store is map of (Index uuid -> Index Metadata). We need to convert it to (Index name -> Index Metadata).
OpenSearch/server/src/main/java/org/opensearch/gateway/remote/RemoteClusterStateService.java
Lines 722 to 728 in 41a12e2
Meta issue #10523
The text was updated successfully, but these errors were encountered: