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] Primary shard based rebalancing across all indices #6642

Open
dreamer-89 opened this issue Mar 13, 2023 · 7 comments
Open
Assignees
Labels
enhancement Enhancement or improvement to existing feature or request Indexing:Replication Issues and PRs related to core replication framework eg segrep

Comments

@dreamer-89
Copy link
Member

dreamer-89 commented Mar 13, 2023

In #6210, primary shard balancing logic was introduced.

  1. [Segment Replication] Allocation and rebalancing based on average primary shard count per index #6422 Added per index primary shard rebalance
  2. [Segment Replication] Add global primary shard balance constraint during allocation #6643 introduced global primary shard balance during allocation

This change is follow up of above to implement global primary shard rebalancing logic. This can be implemented efficiently with #6481 implementation which switches shard roles. This change essentially needs another round of rebalancing to attain primary balance across all indices vs current which perform per index balancing.

Example use-cases

Problem 1 (Multiple primary of different index on same node)

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 due to SameShardAllocator)

Node 1 Node 2
P1 R2
P2 R1
@Poojita-Raj Poojita-Raj added enhancement Enhancement or improvement to existing feature or request distributed framework labels Mar 14, 2023
@dreamer-89 dreamer-89 changed the title [Segment Replication] Primary shard based rebalancing [Segment Replication] Primary shard based rebalancing across all indices Mar 15, 2023
@saikaranam-amazon
Copy link
Member

@anasalkouz Could you please assign this issue to me?

@kkewwei
Copy link
Contributor

kkewwei commented Sep 8, 2023

@saikaranam-amazon @dreamer-89 if not solved, I'd love to try it.

@dreamer-89
Copy link
Member Author

Thanks @kkewwei for the comment.
@saikaranam-amazon : Can you please confirm if you are actively working on this issue. If you are not working, do you mind assigning this issue to @kkewwei

@saikaranam-amazon
Copy link
Member

saikaranam-amazon commented Sep 8, 2023

@dreamer-89 Could you please assign to @kkewwei as I don't have permissions on the issue?

@dreamer-89
Copy link
Member Author

Thanks @saikaranam-amazon for the update. @kkewwei assigned the issue to you. Please feel free to post any questions that you may have.

@Arpit-Bandejiya
Copy link
Contributor

Hi @dreamer-89 @kkewwei if this is not actively worked upon, can I pick the issue?

@kkewwei
Copy link
Contributor

kkewwei commented May 9, 2024

@Arpit-Bandejiya of cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request Indexing:Replication Issues and PRs related to core replication framework eg segrep
Projects
Status: Todo
Development

No branches or pull requests

7 participants