Skip to content

Commit

Permalink
remove stale code
Browse files Browse the repository at this point in the history
Signed-off-by: bansvaru <bansvaru@amazon.com>
  • Loading branch information
linuxpi committed Oct 25, 2023
1 parent c530d2e commit d2d97bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -92,20 +90,6 @@ public void testFullClusterRestoreStaleDelete() throws Exception {

assertEquals(10, repository.blobStore().blobContainer(baseMetadataPath.add("manifest")).listBlobsByPrefix("manifest").size());

Optional<ClusterMetadataManifest> 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<String, IndexMetadata> indexMetadataMap = remoteClusterStateService.getLatestClusterState(
cluster().getClusterName(),
getClusterState().metadata().clusterUUID()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand Down

0 comments on commit d2d97bf

Please sign in to comment.