Skip to content

Commit

Permalink
Merge branch 'collab-central' of github.com:Gaurav614/OpenSearch into…
Browse files Browse the repository at this point in the history
… collab-central

Signed-off-by: Aman Khare <[email protected]>
  • Loading branch information
Aman Khare committed Mar 19, 2024
2 parents a1a4696 + bffa5cd commit 9673843
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ public void processExistingRecoveries(RoutingAllocation allocation, List<List<Sh
List<ShardRouting> ineligibleShards = new ArrayList<>();
// iterate over shards to check for match for each of those
for (ShardRouting shard : shardBatch) {
// need to iterate over all the nodes to find matching shard
if (shard != null && !shard.primary()) {
if (shouldSkipFetchForRecovery(shard)) {
ineligibleShards.add(shard);
Expand Down Expand Up @@ -171,9 +170,8 @@ private Map<DiscoveryNode, StoreFilesMetadata> convertToNodeStoreFilesMetadataMa
ShardRouting unassignedShard,
FetchResult<NodeStoreFilesMetadataBatch> data
) {

if (!data.hasData()) {
return new HashMap<>();
return null;
}

Map<DiscoveryNode, StoreFilesMetadata> map = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,11 @@ protected AsyncShardFetch.FetchResult<NodeStoreFilesMetadataBatch> fetchData(
);
}
}
return new AsyncShardFetch.FetchResult<>(tData, Collections.<ShardId, Set<String>>emptyMap());
return new AsyncShardFetch.FetchResult<>(tData, new HashMap<>(){
{
put(shardId, Collections.emptySet());
}
});
}

@Override
Expand Down

0 comments on commit 9673843

Please sign in to comment.