Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RW Separation] Restrict Search Replica Allocation to Search-Dedicated Nodes #17422

Open
vinaykpud opened this issue Feb 21, 2025 · 0 comments
Open
Labels

Comments

@vinaykpud
Copy link
Contributor

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

  1. Create a cluster with 3 nodes.
  2. Create an index with the following configuration:
    • 1 Primary shard (1P)
    • 1 Replica shard (1R)
    • 1 Search Replica shard (1SR)
  3. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant