diff --git a/server/src/internalClusterTest/java/org/opensearch/gateway/remote/RemoteClusterStateServiceIT.java b/server/src/internalClusterTest/java/org/opensearch/gateway/remote/RemoteClusterStateServiceIT.java index 48824d5b29b06..b5589d964e8ea 100644 --- a/server/src/internalClusterTest/java/org/opensearch/gateway/remote/RemoteClusterStateServiceIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/gateway/remote/RemoteClusterStateServiceIT.java @@ -21,9 +21,7 @@ import java.nio.charset.StandardCharsets; import java.util.Base64; -import java.util.Locale; import java.util.Map; -import java.util.Optional; import java.util.stream.Collectors; import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_NUMBER_OF_REPLICAS; @@ -92,20 +90,6 @@ public void testFullClusterRestoreStaleDelete() throws Exception { assertEquals(10, repository.blobStore().blobContainer(baseMetadataPath.add("manifest")).listBlobsByPrefix("manifest").size()); - Optional clusterMetadataManifest = remoteClusterStateService.getLatestClusterMetadataManifest( - clusterService().state().getClusterName().value(), - getClusterState().metadata().clusterUUID() - ); - if (clusterMetadataManifest.isEmpty()) { - throw new IllegalStateException( - String.format( - Locale.ROOT, - "Latest cluster metadata manifest is not present for the provided clusterUUID: %s", - getClusterState().metadata().clusterUUID() - ) - ); - } - Map indexMetadataMap = remoteClusterStateService.getLatestClusterState( cluster().getClusterName(), getClusterState().metadata().clusterUUID() diff --git a/server/src/main/java/org/opensearch/index/recovery/RemoteStoreRestoreService.java b/server/src/main/java/org/opensearch/index/recovery/RemoteStoreRestoreService.java index 05fdea5650ddb..4d17ac44e8061 100644 --- a/server/src/main/java/org/opensearch/index/recovery/RemoteStoreRestoreService.java +++ b/server/src/main/java/org/opensearch/index/recovery/RemoteStoreRestoreService.java @@ -242,6 +242,8 @@ private RemoteRestoreResult executeRestore( if (remoteState != null) { restoreGlobalMetadata(mdBuilder, remoteState.getMetadata()); + // Restore ClusterState version + logger.info("Restoring ClusterState with Remote State version [{}]", remoteState.version()); builder.version(remoteState.version()); }