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

[BUG] High primary shard weight lead to uneven shard distribution #16470

Closed
Arpit-Bandejiya opened this issue Oct 24, 2024 · 2 comments · Fixed by #16471
Closed

[BUG] High primary shard weight lead to uneven shard distribution #16470

Arpit-Bandejiya opened this issue Oct 24, 2024 · 2 comments · Fixed by #16471
Assignees
Labels
bug Something isn't working ShardManagement:Placement

Comments

@Arpit-Bandejiya
Copy link
Contributor

Describe the bug

We have seen that due to high weight assigned to due to Primary Balance constraint. The nodes with heavy weights never recieve a replica shard and cause uneven shard distribution.

Related component

Other

To Reproduce

Created 100 indices with 100p and 1replica setting.

Expected behavior

The shards should be evenly distributed.

Additional Details

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@HUSTERGS
Copy link
Contributor

HUSTERGS commented Nov 20, 2024

May I ask why the high weight will cause the uneven shard distribution?
After my test, it seems because the high weight will occupy nearly all precision of float, thus the how uneven is the index during the balance phase is no longer accurate, after I change all the float to double, the problem is gone.
If there’s anything wrong with what I said, please feel free to point it out. I really appreciate it. :)
@Arpit-Bandejiya

@HUSTERGS
Copy link
Contributor

May I ask why the high weight will cause the uneven shard distribution? After my test, it seems because the high weight will occupy nearly all precision of float, thus the how uneven is the index during the balance phase is no longer accurate, after I change all the float to double, the problem is gone. If there’s anything wrong with what I said, please feel free to point it out. I really appreciate it. :) @Arpit-Bandejiya

And I see the #16471 try to lower the constrain weight, but the weight for INDEX_SHARD_PER_NODE_BREACH_CONSTRAINT_ID and INDEX_PRIMARY_SHARD_BALANCE_CONSTRAINT_ID remain the old settings, that is 1000000L, which I guess may have similar problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ShardManagement:Placement
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants