-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
Lazy data stream rollover is not triggered when using reroute #112781
Comments
Pinging @elastic/es-data-management (Team:Data Management) |
Is this a more general case of lazy rollover only being triggered post ingest pipeline, and not specific to rerouting? We're also seeing issues related to upgrading from older versions of of APM (e.g. 8.12.1) to 8.15.1, without any reroute processor involved. |
Hi @axw, we did not know you were doing version checks on the pipelines, so yes, that is definitely a side effect of the lazy rollover happening only upon a write to the index. The timing of the rollover is important though because if we rollover earlier we risk creating empty indices. We discussed possible approaches to solve this in a way that does not produce extra indices and we have the following proposal:
This way we have the following benefits:
The drawbacks:
|
@gmarouli thanks, sounds reasonable. Just to clarify, we don't do version checks in recent versions of our ingest pipeline - that only applies to versions before 8.13.0.
+1 that was also my first thought. Would it make sense to extend this approach to also update the marked data stream after executing the pipeline if there were no writes? |
What do you mean with this? |
@gmarouli sorry, that was very unclear, let me try again. If the data stream is marked for lazy rollover, do what you described where we resolve any settings (e.g. ingest pipeline) that may affect ingestion from the matching index template; then if there was a change in template, execute the rollover even if there were no writes to the data stream's backing index. That way we wouldn't need to do the template resolution on every write to the data stream, only once per lazy rollover. |
@axw thank you for the explanation, I get it now. You are right, that would address the potential latency but we would be creating empty indices which is something we want to avoid. Let's say what's the impact and if it can be sustained until we have a more structural solution available. |
Elasticsearch Version
8.15.1
Installed Plugins
No response
Java Version
bundled
OS Version
N/A
Problem Description
Lazy rollover on a data stream is not triggered when writing a document that is rerouted to another data stream. This affects the apm-data plugin, where we perform a lazy rollover of matching data stream patterns when installing or updating index templates. The data stream never rolls over. See elastic/apm-server#14060 (comment)
Should a write that leads to a reroute also trigger the lazy rollover? I think so, otherwise the default pipeline will not change.
Steps to Reproduce
Logs (if relevant)
No response
The text was updated successfully, but these errors were encountered: