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

Fix max_primary_shard_size resize factor math #86897

Merged

Conversation

joegallo
Copy link
Contributor

@joegallo joegallo commented May 18, 2022

There's an off-by-one bug in #67705, such that the logic doesn't handle all factors correctly in some circumstances.

For example, calculateAcceptableNumberOfShards(9, 2) would return 9 rather than 3, because it would evaluate all potential factors up to but not including 3 (<), and not finding such a factor, it would return 9. The correct logic should evaluate all potential factors up to and including 3 (<=), and return 3.

@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label May 18, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@elasticsearchmachine
Copy link
Collaborator

Hi @joegallo, I've created a changelog YAML for you.

Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for fixing this.

@joegallo
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/part-2

@joegallo joegallo merged commit 4191b4f into elastic:master May 18, 2022
@joegallo joegallo deleted the fix-max_primary_shard_size-resize-factor-math branch May 18, 2022 20:06
joegallo added a commit to joegallo/elasticsearch that referenced this pull request May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Data Management/ILM+SLM Index and Snapshot lifecycle management Team:Data Management Meta label for data/management team v7.17.4 v8.2.1 v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants