Closed
Description
Describe the bug
Description
String.format
is a relatively expensive operation for concatenating strings. Inside RemoteStoreMigrationAllocationDecider
, the function calls to String.format
stands out as the most resource-intensive operation in terms of latency.

Related component
Indexing:Replication
To Reproduce
Create 500k shards on a setup with 1000 data nodes and 3 master nodes.
Expected behavior
Improves the latency of RemoteStoreMigrationAllocationDecider by replacing calls to String.format with more efficient StringBuilder for string concatenation
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):
- OS: [e.g. iOS]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.