Open Arpit-Bandejiya opened 1 month ago
We are writing the discoveryNodes here which is becoming the bottleneck: https://github.com/opensearch-project/OpenSearch/blob/09bacee5fc85676e97bee6b4ad87dec35c6aa8cc/server/src/main/java/org/opensearch/cluster/ClusterState.java#L784
Describe the bug
Currently good chunk of master CPU is going in TransportClusterManagerNodeAction where we are ser/deser the discovery nodes. We could caches these values and optimise these calls.
Related component
Cluster Manager
To Reproduce
Create an cluster with large number of nodes and do CPU profiling of the active master.
Expected behavior
We could have leveraged the stored discovery nodes in the cluster state to populate the discoveryNodes.
Additional Details
Plugins Please list all plugins currently enabled.
Screenshots If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
Additional context Add any other context about the problem here.