-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Add index.look_back_time setting for tsdb data streams #98463
Comments
Pinging @elastic/es-analytics-geo (Team:Analytics) |
This change adds a `index.look_back_time` index setting that sets the `index.time_series.start_time` setting for the first backing index when a data stream is created. This allows accepting data that is older for initial indexing without changing the `index.look_ahead_time` setting. This setting also controls the `index.time_series.end_time` setting and would affect rollovers as well. The default for the `index.look_back_time` is `2h`, which means documents with `@timestamp` up to 2 hours after creation of the data stream are allowed to be indexed. This is the same as is without this change, because `index.look_ahead_time` is used to set `index.time_series.start_time` of the first backing index. Closes elastic#98463
Thanks @martijnvg, Lets also keep a long-term discussion open, if we see dropped metrics because they are being queued at source. This could impact all packages. |
@lalit-satapathy I've opened #99343 to track this problem. |
This change adds a `index.look_back_time` index setting that sets the `index.time_series.start_time` setting for the first backing index when a data stream is created. This allows accepting data that is older for initial indexing without changing the `index.look_ahead_time` setting. This setting also controls the `index.time_series.end_time` setting and would affect rollovers as well. The default for the `index.look_back_time` is `2h`, which means documents with `@timestamp` up to 2 hours after creation of the data stream are allowed to be indexed. This is the same as is without this change, because `index.look_ahead_time` is used to set `index.time_series.start_time` of the first backing index. Closes #98463
Currently the
index.look_ahead_time
index setting controls theindex.time_series_end_time
index setting when rolling over a tsdb data stream. Theindex.look_ahead_time
setting default to 2 hours, which means the by default theindex.time_series_end_time
index setting of the new backing index will be 2 hours later than theindex.time_series.start_time
index setting. The theindex.time_series.start_time
andindex.time_series_end_time
index settings control what@timestamp
are allowed to be indexed.Additionally the
index.look_ahead_time
setting is used to generate theindex.time_series.start_time
andindex.time_series_end_time
index settings when creating a new data stream for the first backing index. Based on the defaults ofindex.look_ahead_time
setting, theindex.time_series.start_time
index is set to current time - 2 hours and theindex.time_series_end_time
index setting is set to current time + 2 hours.However for indexing the initial data setting the
index.time_series.start_time
index setting to 2 hours in the past sometimes creates too small time window. For example because data gets indexed starting from midnight that day.The idea is to add a
index.look_back_time
setting that controls how to generate theindex.time_series.start_time
index setting when creating the data stream (for the first backing index). This allows for creating a first backing index that accepts data that is earlier then current time - $index.look_ahead_time, without affecting howindex.time_series.start_time
andindex.time_series_end_time
index settings are generated during rollover.I think a good default for the
index.look_back_time
setting would be 24 hours. Meaning that by default theindex.time_series.start_time
index setting for the first backing index of a new data stream would be current time - 24 hours.Relates to elastic/integrations#7345
The text was updated successfully, but these errors were encountered: