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

Avoid immense term error in metrics metadata fields #1835

Merged
merged 4 commits into from
Mar 13, 2024

Conversation

gbanasiak
Copy link
Contributor

@gbanasiak gbanasiak commented Feb 28, 2024

To avoid immense term error in metrics metadata fields:

  • meta.error-description field mapping changes from keyword to wildcard which fits this type of content better while still allowing the search,
  • remaining dynamically mapped text fields get "ignore_above": 8191 parameter to prevent immense term error in the worst case of error message being composed entirely of UTF-8 characters (see doc),
  • meta.error-description field generated in BulkIndex runner gets limited to 5 unique errors only for better log readability - currently, in the worst case the field is concatenated from errors from all bulk documents.

Addresses #1834.

@gbanasiak gbanasiak requested a review from a team February 28, 2024 19:13
Copy link
Member

@inqueue inqueue left a comment

Choose a reason for hiding this comment

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

LGTM

"meta": {
"properties": {
"error-description": {
"type": "wildcard"
Copy link
Member

Choose a reason for hiding this comment

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

The wildcard mapping type is a wise choice for our use case. error-description can be quite large and does not need the tokenization a text mapping type would bring.

@gbanasiak gbanasiak merged commit e4d9b3c into elastic:master Mar 13, 2024
15 checks passed
@gbanasiak gbanasiak deleted the fix-immense-term branch March 13, 2024 16:04
@gareth-ellis gareth-ellis added this to the 2.11 milestone May 23, 2024
@gareth-ellis gareth-ellis added the bug Something's wrong label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something's wrong
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants