Skip to content

[Bug] Fix cluster health API response  #9020

@amkhar

Description

@amkhar

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.

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

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions