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

Lower the look_ahead_time setting's maximum value. #103434

Merged
merged 10 commits into from Dec 20, 2023

Conversation

martijnvg
Copy link
Member

@martijnvg martijnvg commented Dec 14, 2023

Initially the index.look_head_time was both used to define the index.time_series.start_time and index.time_series.end_time.

The former is now controlled by index.look_back_time and the maximum value of 7 days for index.look_ahead_time is too generous. As it also delays data being indexed to new index after rollover by up to 7 days.

This PR changes the index.look_ahead_time setting's maximum allowed value from 7 days to 2 hours, which is equal to the index.look_ahead_time setting's default. A look ahead time of 2 hours is high enough to accept data that is ahead of the current time, but avoids configuring the index.look_ahead_time setting to a too high value that causes rolled over indices to not receive writes for a very long period.

This is a breaking change, but configuring the index.look_ahead_time setting to a higher value than 2 hours will not fail. Instead 2 hours will be used a look ahead time.

The index.look_ahead_time setting's default will be changed in a different change.

Initially the index.look_head_time was both used to define the index.time_series.start_time and index.time_series.end_time.

The former is now controlled by index.look_back_time and the previous default of 2 hour for index.look_ahead_time is too generous. As it also delays data being indexed to new index after rollover by 2 hours.

This change changes the index.look_ahead_time setting from 2 hours to 30 minutes. This should still allow data that is ahead of the current time of Elasticsearch nodes, but reduces the delay that the new backing index receives write after rollover. Additionally, the max value is reduced to 2 hours instead of 7 days.
@elasticsearchmachine
Copy link
Collaborator

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

@martijnvg martijnvg changed the title Lower the look_ahead_time setting's default and max value. Lower the look_ahead_time setting's maximum value. Dec 18, 2023
@elasticsearchmachine
Copy link
Collaborator

Hi @martijnvg, I've updated the changelog YAML for you. Note that since this PR is labelled >breaking, you need to update the changelog YAML to fill out the extended information sections.

@elasticsearchmachine
Copy link
Collaborator

Hi @martijnvg, I've updated the changelog YAML for you. Note that since this PR is labelled >breaking, you need to update the changelog YAML to fill out the extended information sections.

@martijnvg martijnvg marked this pull request as ready for review December 18, 2023 08:06
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Dec 18, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (Team:Analytics)

Copy link
Contributor

@andreidan andreidan left a comment

Choose a reason for hiding this comment

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

Thanks Martijn, LGTM (pending breaking change approval)

@martijnvg martijnvg merged commit 842303c into elastic:main Dec 20, 2023
15 checks passed
@martijnvg martijnvg added the >bug label Dec 20, 2023
@elasticsearchmachine
Copy link
Collaborator

@martijnvg according to this PR's labels, I need to update the changelog YAML, but I can't because the PR is closed. Please either update the changelog yourself on the appropriate branch, or adjust the labels. Specifically:

  • The PR is not labelled >breaking-java but the changelog has a breaking section

javanna pushed a commit to javanna/elasticsearch that referenced this pull request Dec 21, 2023
Initially the index.look_head_time was both used to define the index.time_series.start_time and index.time_series.end_time.

The former is now controlled by index.look_back_time and the maximum value of 7 days for index.look_ahead_time is too generous. As it also delays data being indexed to new index after rollover by up to 7 days.

This PR changes the index.look_ahead_time setting's maximum allowed value from 7 days to 2 hours, which is equal to the index.look_ahead_time setting's default. A look ahead time of 2 hours is high enough to accept data that is ahead of the current time, but avoids configuring the index.look_ahead_time setting to a too high value that causes rolled over indices to not receive writes for a very long period.

This is a breaking change, but configuring the index.look_ahead_time setting to a higher value than 2 hours will not fail. Instead 2 hours will be used a look ahead time.
navarone-feekery pushed a commit to navarone-feekery/elasticsearch that referenced this pull request Dec 22, 2023
Initially the index.look_head_time was both used to define the index.time_series.start_time and index.time_series.end_time.

The former is now controlled by index.look_back_time and the maximum value of 7 days for index.look_ahead_time is too generous. As it also delays data being indexed to new index after rollover by up to 7 days.

This PR changes the index.look_ahead_time setting's maximum allowed value from 7 days to 2 hours, which is equal to the index.look_ahead_time setting's default. A look ahead time of 2 hours is high enough to accept data that is ahead of the current time, but avoids configuring the index.look_ahead_time setting to a too high value that causes rolled over indices to not receive writes for a very long period.

This is a breaking change, but configuring the index.look_ahead_time setting to a higher value than 2 hours will not fail. Instead 2 hours will be used a look ahead time.
@martijnvg martijnvg removed the >bug label Jan 4, 2024
@elasticsearchmachine
Copy link
Collaborator

@martijnvg according to this PR's labels, I need to update the changelog YAML, but I can't because the PR is closed. Please either update the changelog yourself on the appropriate branch, or adjust the labels. Specifically:

  • The PR is not labelled >breaking-java but the changelog has a breaking section

martijnvg added a commit that referenced this pull request Jan 5, 2024
…30 minutes. (#103898)

A followup from #103434

The impact of this change is that by default documents with @timestamp of 30 minutes or more in the future will be rejected. Prior to this change by default documents with @timestamp of 2 hours or more in the future were rejected.
If the previous behaviour should be kept, then update the index.look_ahead_time setting to two hours before performing the upgrade.

By reducing the default look ahead time, new metrics will sooner be indexed into the new backing index. With the current default it takes up to 2 hours before writes get indexed into the new backing index. This is after rollover has occurred. This delayed effect can result in previous backing index growing well beyond the rollover conditions. This change should reduce this effect.
jbaiera pushed a commit to jbaiera/elasticsearch that referenced this pull request Jan 10, 2024
Initially the index.look_head_time was both used to define the index.time_series.start_time and index.time_series.end_time.

The former is now controlled by index.look_back_time and the maximum value of 7 days for index.look_ahead_time is too generous. As it also delays data being indexed to new index after rollover by up to 7 days.

This PR changes the index.look_ahead_time setting's maximum allowed value from 7 days to 2 hours, which is equal to the index.look_ahead_time setting's default. A look ahead time of 2 hours is high enough to accept data that is ahead of the current time, but avoids configuring the index.look_ahead_time setting to a too high value that causes rolled over indices to not receive writes for a very long period.

This is a breaking change, but configuring the index.look_ahead_time setting to a higher value than 2 hours will not fail. Instead 2 hours will be used a look ahead time.
jbaiera pushed a commit to jbaiera/elasticsearch that referenced this pull request Jan 10, 2024
…30 minutes. (elastic#103898)

A followup from elastic#103434

The impact of this change is that by default documents with @timestamp of 30 minutes or more in the future will be rejected. Prior to this change by default documents with @timestamp of 2 hours or more in the future were rejected.
If the previous behaviour should be kept, then update the index.look_ahead_time setting to two hours before performing the upgrade.

By reducing the default look ahead time, new metrics will sooner be indexed into the new backing index. With the current default it takes up to 2 hours before writes get indexed into the new backing index. This is after rollover has occurred. This delayed effect can result in previous backing index growing well beyond the rollover conditions. This change should reduce this effect.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>breaking :StorageEngine/TSDB You know, for Metrics Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants