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

[Segment Replication] Swap role of primary and replica shard #6481

Open
dreamer-89 opened this issue Feb 24, 2023 · 0 comments
Open

[Segment Replication] Swap role of primary and replica shard #6481

dreamer-89 opened this issue Feb 24, 2023 · 0 comments
Labels
discuss Issues intended to help drive brainstorming and decision making feedback needed Issue or PR needs feedback Indexing:Replication Issues and PRs related to core replication framework eg segrep

Comments

@dreamer-89
Copy link
Member

dreamer-89 commented Feb 24, 2023

Coming from disucssion in #6210 which introduced primary shard based balancing, may need extra relocations (example 1) to attain complete balance and in some situations relocation is not at all possible (example 2). This can be fixed with minimal (single) operation by exchanging primary and replica shard roles. This needs to be done under primary shard permit and ensure this change is committed to cluster state. This is already tried for searchable snapshot, can be attempted for hot shards as well.

Problem 1 (More relocations)

Node 1 Node 2
P1 R3
P2 R4
Node 1 Node 2
P1 R3
R4
P2
Node 1 Node 2
P1 R3
R4 P2

Problem 2 (No relocation possible)

Node 1 Node 2
P1 R2
P2 R1
@dreamer-89 dreamer-89 added discuss Issues intended to help drive brainstorming and decision making feedback needed Issue or PR needs feedback untriaged distributed framework labels Feb 24, 2023
@kartg kartg removed the untriaged label Feb 24, 2023
@Bukhtawar Bukhtawar added the Indexing:Replication Issues and PRs related to core replication framework eg segrep label Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Issues intended to help drive brainstorming and decision making feedback needed Issue or PR needs feedback Indexing:Replication Issues and PRs related to core replication framework eg segrep
Projects
None yet
Development

No branches or pull requests

4 participants