Skip to content

Conversation

@jimczi
Copy link
Contributor

@jimczi jimczi commented Oct 22, 2019

This commit fixes the usage of JsonStringEncoder#quoteAsUTF8 in the SearchSlowLog.
JsonStringEncoder#getInstance should always be called to get a thread local object
but this assumption was broken by #44642. This means that any slow log can throw
an AIOOBE since it uses the same byte array concurrently.

Closes #48358

This commit fixes the usage of JsonStringEncoder#quoteAsUTF8 in the SearchSlowLog.
JsonStringEncoder#getInstance should always be called to get a thread local object
but this assumption was broken by elastic#44642. This means that any slow log can throw
an AIOOBE since it uses the same byte array concurrently.

Closes elastic#48358
@jimczi jimczi added >bug :Core/Infra/Logging Log management and logging utilities v8.0.0 v7.5.0 labels Oct 22, 2019
@jimczi jimczi requested a review from pgomulka October 22, 2019 17:52
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Logging)

Copy link
Contributor

@pgomulka pgomulka left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for fixing this so quickly @jimczi

@pgomulka
Copy link
Contributor

@elasticmachine run elasticsearch-ci/1

@jimczi jimczi merged commit cf13259 into elastic:master Oct 23, 2019
@jimczi jimczi deleted the search_slow_log_thread_local branch October 23, 2019 08:19
jimczi added a commit that referenced this pull request Oct 23, 2019
This commit fixes the usage of JsonStringEncoder#quoteAsUTF8 in the SearchSlowLog.
JsonStringEncoder#getInstance should always be called to get a thread local object
but this assumption was broken by #44642. This means that any slow log can throw
an AIOOBE since it uses the same byte array concurrently.

Closes #48358
jimczi added a commit that referenced this pull request Oct 23, 2019
This commit fixes the usage of JsonStringEncoder#quoteAsUTF8 in the SearchSlowLog.
JsonStringEncoder#getInstance should always be called to get a thread local object
but this assumption was broken by #44642. This means that any slow log can throw
an AIOOBE since it uses the same byte array concurrently.

Closes #48358
@jimczi jimczi added the v7.4.2 label Oct 28, 2019
jimczi added a commit that referenced this pull request Oct 28, 2019
This commit fixes the usage of JsonStringEncoder#quoteAsUTF8 in the SearchSlowLog.
JsonStringEncoder#getInstance should always be called to get a thread local object
but this assumption was broken by #44642. This means that any slow log can throw
an AIOOBE since it uses the same byte array concurrently.

Closes #48358
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slow log fails after upgrading from 6.8.3 to 7.4.0

5 participants