-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[Bug] Fix cluster health API response #9020
Description
Describe the bug
Original Issue opened : #5098 . This issue is a sub task for the overall project defined #8098.
Description
Today, during node drop and joins, we fetch the metadata of unassigned shards on per shard basis. As part of the project #8098 we're changing the fetches to happen for a batch of shards. These async fetches are given in the response of _cluster/health API. We need to make changes to correctly reflect that value after fetch is happening at a batch level.
OpenSearch/server/src/main/java/org/opensearch/gateway/GatewayAllocator.java
Lines 117 to 126 in b2a7348
| public int getNumberOfInFlightFetches() { | |
| int count = 0; | |
| for (AsyncShardFetch<TransportNodesListGatewayStartedShards.NodeGatewayStartedShards> fetch : asyncFetchStarted.values()) { | |
| count += fetch.getNumberOfInFlightFetches(); | |
| } | |
| for (AsyncShardFetch<TransportNodesListShardStoreMetadata.NodeStoreFilesMetadata> fetch : asyncFetchStore.values()) { | |
| count += fetch.getNumberOfInFlightFetches(); | |
| } | |
| return count; | |
| } |
Additional context
Please go through the discussion #5098 to understand the overall enhancement approach and check #8098 to see the sub tasks of overall project.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status