OpenSearch/x-pack
Martijn van Groningen b034153df7
Change grok watch dog to be Matcher based instead of thread based. (#48346)
There is a watchdog in order to avoid long running (and expensive)
grok expressions. Currently the watchdog is thread based, threads
that run grok expressions are registered and after completion unregister.
If these threads stay registered for too long then the watch dog interrupts
these threads. Joni (the library that powers grok expressions) has a
mechanism that checks whether the current thread is interrupted and
if so abort the pattern matching.

Newer versions have an additional method to abort long running pattern
matching inside joni. Instead of checking the thread's interrupted flag,
joni now also checks a volatile field that can be set via a `Matcher`
instance. This is more efficient method for aborting long running matches.
(joni checks each 30k iterations whether interrupted flag is set vs.
just checking a volatile field)

Recently we upgraded to a recent joni version (#47374), and this PR
is a followup of that PR.

This change should also fix #43673, since it appears when unit tests
are ran the a test runner thread's interrupted flag may already have
been set, due to some thread reuse.
2019-10-24 15:34:01 +02:00
..
dev-tools Build: Merge xpack checkstyle config into core (#33399) 2018-09-05 09:17:02 -04:00
docs [DOCS] Remove binary gendered language (#48362) 2019-10-23 09:37:12 -05:00
license-tools [Backport] Remove dependency substitutions 7.x (#42866) 2019-06-04 13:50:23 -07:00
plugin Change grok watch dog to be Matcher based instead of thread based. (#48346) 2019-10-24 15:34:01 +02:00
qa Ensure SLM stats does not block an in-place upgrade from 7.4 (… (#48411) 2019-10-23 11:21:39 -05:00
snapshot-tool Explicitly declare test fixture usage (#48166) 2019-10-17 10:05:40 +03:00
test Document SAML APIs (#45105) (#47909) 2019-10-11 16:34:11 +03:00
transport-client [Backport] Remove dependency substitutions 7.x (#42866) 2019-06-04 13:50:23 -07:00
NOTICE.txt
README.md
build.gradle [Backport] Remove dependency substitutions 7.x (#42866) 2019-06-04 13:50:23 -07:00

README.md

Elastic License Functionality

This directory tree contains files subject to the Elastic License. The files subject to the Elastic License are grouped in this directory to clearly separate them from files licensed under the Apache License 2.0.