-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Closed
Copy link
Labels
Description
Describe the bug
When an index is created or when search replicas are added for an index, search replicas should be allocated only to nodes that have the search role assigned. If there are no such nodes available, the search replicas should remain in an unassigned state. If a node with the search role becomes available later, the search replicas should be assigned accordingly.
Related component
Search:Performance
To Reproduce
- Create a cluster with 3 nodes.
- Create an index with the following configuration:
- 1 Primary shard (1P)
- 1 Replica shard (1R)
- 1 Search Replica shard (1SR)
- Observe how the shards are allocated across the cluster.
- Currently, search replicas may get assigned to nodes without the search role, leading to incorrect shard placement.
Expected behavior
- The primary and replica shards should be assigned to available nodes.
- The search replica should remain in an unassigned state if no node with the search role exists.
- If a node with the search role is added to the cluster, the search replica should be assigned to it.
Assigning a search node role for a node:
Ref: #15445
curl -X PUT "http://localhost:9200/_cluster/settings" \
-H "Content-Type: application/json" \
-d '{
"persistent": {
"cluster.routing.allocation.search.replica.dedicated.include._name": "node-1"
}
}'
Additional Details
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
✅ Done