Skip to content

Update ilm-rollover.asciidoc #125507

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

Open
wants to merge 1 commit into
base: 8.17
Choose a base branch
from
Open

Update ilm-rollover.asciidoc #125507

wants to merge 1 commit into from

Conversation

berto-lstc
Copy link

With max_primary_shard_size: 50gb, the size "at most 50gb" not "at least" as indicated in the docs.

  • Have you signed the contributor license agreement?
  • Have you followed the contributor guidelines?
  • If submitting code, have you built your formula locally prior to submission with gradle check?
  • If submitting code, is your pull request against main? Unless there is a good reason otherwise, we prefer pull requests against main and will backport as needed.
  • If submitting code, have you checked that your submission is for an OS and architecture that we support?
  • If you are submitting this code for a class then read our policy for that.

With max_primary_shard_size: 50gb, the size "at most 50gb" not "at least" as indicated in the docs.
Copy link
Contributor

Documentation preview:

@elasticsearchmachine
Copy link
Collaborator

@berto-lstc please enable the option "Allow edits and access to secrets by maintainers" on your PR. For more information, see the documentation.

@elasticsearchmachine elasticsearchmachine added needs:triage Requires assignment of a team area label v8.17.5 external-contributor Pull request authored by a developer outside the Elasticsearch team labels Mar 24, 2025
@berto-lstc berto-lstc requested a review from joegallo March 24, 2025 15:38
@joegallo
Copy link
Contributor

Hmmm... I'm not sure I agree with this change in wording -- can you elaborate?

@berto-lstc
Copy link
Author

sure @joegallo , max_primary_shard_size setting is the maximum size the primary shard can reach, in the documentation it says "at least" which I understand as the minimum size.
In the original document:
"This example rolls the index over when the primary shard size is at least 50gb"
The configuration is as follows:

"rollover" : {
            "max_primary_shard_size": "50gb",
            "max_age": "30d",
            "min_primary_shard_size": "1gb"
          }

The primary shard size is at least 1gb, thus >1GB, and the primary shard size max is 50GB., then primary_shard_size will be 50gb at most, not "at least" as it's written now.

Perhaps I'm missing something.

@AI-IshanBhatt AI-IshanBhatt added the >docs General docs changes label Mar 26, 2025
@elasticsearchmachine elasticsearchmachine added Team:Docs Meta label for docs team and removed needs:triage Requires assignment of a team area label labels Mar 26, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@joegallo
Copy link
Contributor

No, I still think "at least" is the correct wording.

The rollover code will not roll over the index until the primary size is equal to or greater than the configured size.

Copy link
Contributor

@joegallo joegallo left a comment

Choose a reason for hiding this comment

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

I'm marking a red X on this because I don't want somebody else to come along and add a green check without first convincing me.

@joegallo
Copy link
Contributor

joegallo commented Mar 26, 2025

All min_ conditions must be satisfied for rollover to occur. At least one max_ condition must be satisfied for rollover to occur.

The policy can be restated like this:

A.) The index will roll over as long as it has a primary shard that is AT LEAST 50gb, AND it has a primary shard that is AT LEAST 1gb (yes, this is duplicated, bear with me).

OR

B.) The index will roll over as long as it is AT LEAST 30 days old, AND it has a primary shard that is AT LEAST 1gb.

Let's apply a round of simplification, and remove the duplicated size requirements in the first half, since the only way a primary shard will be at least 50gb is if it is also at least 1gb:

A.) The index will roll over as long as it has a primary shard that is AT LEAST 50gb.

OR

B.) The index will roll over as long as it is AT LEAST 30 days old, AND it has a primary shard that is AT LEAST 1gb.

Or, dropping the extra formatting, we have the wording from the doc in question itself, which is:

This example rolls the index over when the primary shard size is at least 50gb,
or when the index is at least 30 days old, but only as long as a primary shard is at least 1gb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes external-contributor Pull request authored by a developer outside the Elasticsearch team Team:Docs Meta label for docs team v8.17.7
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants