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

[8.x] [Dataset Quality ] Apply chunking strategy for data stream stats retrieval (#194816) #195240

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…ieval (elastic#194816)

## 📓 Summary

Closes elastic#192169

This work fixes the issue with some requests hitting the too-long HTTP
line once we combine all the dataset names into a single request.

We had a suggested strategy from the work done with elastic#171735 , but it
presented a couple of problems.
- The HTTP line length issue occurs for an exceeding length of the
request URL, which goes over 4096 bytes (4096 characters.) This also
includes the whole URL protocol, domain, path and any other parameters,
so assuming that we have 4096 characters for the `index` parameter is
incorrect, as we would exceed the maximum anyway in a worst-case
scenario, where we have a chunk of 16 values with length 255 chars.
- Always chunking the requests in groups of 16 items might not be
optimal in the most common scenario where we have short data stream
patterns.

I opted to adopt a different chunking strategy that optimizes each chunk
so that we reduce the requests triggered on the cluster to a minimum.

I'll leave more notes in the code to help with the review.

---------

Co-authored-by: Marco Antonio Ghiani <[email protected]>
(cherry picked from commit bff69e2)
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @tonyghiani

@kibanamachine kibanamachine merged commit c5fe95f into elastic:8.x Oct 7, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport ci:project-deploy-observability Create an Observability project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants