OpenSearch icon indicating copy to clipboard operation
OpenSearch copied to clipboard

[Segment Replication] Primary shard based rebalancing across all indices

Open dreamer-89 opened this issue 2 years ago • 7 comments

In #6210, primary shard balancing logic was introduced.

  1. https://github.com/opensearch-project/OpenSearch/pull/6422 Added per index primary shard rebalance
  2. https://github.com/opensearch-project/OpenSearch/pull/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 https://github.com/opensearch-project/OpenSearch/issues/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

dreamer-89 avatar Mar 13 '23 00:03 dreamer-89

@anasalkouz Could you please assign this issue to me?

saikaranam-amazon avatar May 24 '23 13:05 saikaranam-amazon

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

kkewwei avatar Sep 08 '23 05:09 kkewwei

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

dreamer-89 avatar Sep 08 '23 06:09 dreamer-89

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

saikaranam-amazon avatar Sep 08 '23 06:09 saikaranam-amazon

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

dreamer-89 avatar Sep 08 '23 16:09 dreamer-89

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

Arpit-Bandejiya avatar Feb 06 '24 07:02 Arpit-Bandejiya

@Arpit-Bandejiya of cause.

kkewwei avatar May 09 '24 09:05 kkewwei