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

[Logs UI] Use point-in-time reader for consistent log entry fetching #79262

Open
weltenwort opened this issue Oct 2, 2020 · 3 comments
Open
Labels
Feature:Logs UI Logs UI feature Team:obs-ux-logs Observability Logs User Experience Team

Comments

@weltenwort
Copy link
Member

Summary

The /api/log_entries/entries route issues several requests to Elasticsearch in order to efficiently fetch a chunk of log entries. The new point-in-time API in Elasticsearch can avoid timing-related inconsistencies in the results.

Background

In the requests the log entries are sorted by the timestamp and the _doc value as a tiebreaker. The latter can change when segments are merged by Elasticsearch, which can not be controlled or predicted by our code. If that happens while a client fetches a chunk of log entries via the above route the results might be incorrect. Specifically, the response might contain duplicate log entries or miss a arbitrarily large chunk of log entries.

With the newly added point-in-time API in Elasticsearch (elastic/elasticsearch#61062) we have the ability to request a consistent view on the indices for a short time. This would prevent such inconsistencies from occurring since the requests would all access the same stable set of segments.

This also applies to the requests made by the planned search strategy (#76677).

Acceptance criteria

  • The log entries adapter, which backs the log entries route at /api/log_entries/entries, uses the new point-in-time API to access a consistent view for the duration of the HTTP request.
  • The point-in-time state is created with an appropriate TTL.
  • The point-in-time state is properly cleaned up when the requests are finished (also on failure).

Related links

@weltenwort weltenwort added Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services labels Oct 2, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)

@weltenwort
Copy link
Member Author

ℹ️ This also applies to the new log entries search strategy that was created in the meantime.

@gbamparop gbamparop added Team:obs-ux-logs Observability Logs User Experience Team and removed Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services labels Nov 9, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs)

@botelastic botelastic bot added needs-team Issues missing a team label and removed needs-team Issues missing a team label labels Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Logs UI Logs UI feature Team:obs-ux-logs Observability Logs User Experience Team
Projects
None yet
Development

No branches or pull requests

3 participants