Skip to content

Commit

Permalink
Update JoinTaskExecutor.java, minor update
Browse files Browse the repository at this point in the history
Signed-off-by: shwetathareja <[email protected]>
Signed-off-by: Rajiv Kumar Vaidyanathan <[email protected]>
  • Loading branch information
shwetathareja authored and rajiv-kv committed Oct 28, 2024
1 parent 6c466e6 commit 158d68c
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,22 +192,22 @@ public ClusterTasksResult<Task> execute(ClusterState currentState, List<Task> jo
.stream()
.filter(DiscoveryNode::isRemoteStatePublicationEnabled)
.findFirst();
RepositoriesMetadata existingrepositoriesMetadata = currentState.getMetadata().custom(RepositoriesMetadata.TYPE);
RepositoriesMetadata existingRepositoriesMetadata = currentState.getMetadata().custom(RepositoriesMetadata.TYPE);
Map<String, RepositoryMetadata> repositories = new LinkedHashMap<>();
if (existingrepositoriesMetadata != null) {
existingrepositoriesMetadata.repositories().forEach(r -> repositories.putIfAbsent(r.name(), r));
if (existingRepositoriesMetadata != null) {
existingRepositoriesMetadata.repositories().forEach(r -> repositories.putIfAbsent(r.name(), r));
}
if (remoteDN.isPresent()) {
RepositoriesMetadata repositoriesMetadata = remoteStoreNodeService.updateRepositoriesMetadata(
remoteDN.get(),
existingrepositoriesMetadata
existingRepositoriesMetadata
);
repositoriesMetadata.repositories().forEach(r -> repositories.putIfAbsent(r.name(), r));
}
if (remotePublicationDN.isPresent()) {
RepositoriesMetadata repositoriesMetadata = remoteStoreNodeService.updateRepositoriesMetadata(
remotePublicationDN.get(),
existingrepositoriesMetadata
existingRepositoriesMetadata
);
repositoriesMetadata.repositories().forEach(r -> repositories.putIfAbsent(r.name(), r));
}
Expand Down Expand Up @@ -246,7 +246,7 @@ public ClusterTasksResult<Task> execute(ClusterState currentState, List<Task> jo
logger.info("Updating system repository now for remote store");
RepositoriesMetadata repositoriesMetadata = remoteStoreNodeService.updateRepositoriesMetadata(
node,
existingrepositoriesMetadata
existingRepositoriesMetadata
);
repositoriesMetadata.repositories().forEach(r -> repositories.putIfAbsent(r.name(), r));
}
Expand Down

0 comments on commit 158d68c

Please sign in to comment.