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

feat: Update logic for ShardToNodeRatio and MinIndexReplicas #157

Merged
merged 5 commits into from
Mar 15, 2021

Conversation

s-vkropotko
Copy link

@s-vkropotko s-vkropotko commented Mar 4, 2021

one line summary

Issue : #141

Description

With this PR I try to fix a bug with setting minIndexReplicas on config change and update the logic for a ShardToNodeRatio param.
Fix a function calculateNodesWithSameShardToNodeRatio, before if we have shards < nodes, the function conducts division to the number what is <1 (0 < n < 1), as a result function increases replicas.
About an evaluation of number of nodes on checking MinShardsPerNode: looks like it makes sense to do it only in case of the new number of shards is more than MinShardsPerNode.

Types of Changes

Fix bug #141
Minor changes for ShardToNodeRatio param logic

Review

List of tasks the reviewer must do to review the PR

  • Tests

Deployment Notes

These should highlight any db migrations, feature toggles, etc.

@mikkeloscar
Copy link
Collaborator

@s-vkropotko Thanks! Could you add a test covering this change

Signed-off-by: vkropotko <[email protected]>
@s-vkropotko
Copy link
Author

@mikkeloscar hey! Could you please check tests in the PR?

operator/autoscaler.go Outdated Show resolved Hide resolved
operator/autoscaler.go Outdated Show resolved Hide resolved
Signed-off-by: vkropotko <[email protected]>
operator/autoscaler.go Outdated Show resolved Hide resolved
@otrosien
Copy link
Member

👍

1 similar comment
@mikkeloscar
Copy link
Collaborator

👍

@mikkeloscar mikkeloscar merged commit 9180779 into zalando-incubator:master Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants