OpenSearch/libs
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
..
cli CLI tools: write errors to stderr instead of stdout (#45586) 2019-08-21 14:46:07 -04:00
core Remove eclipse conditionals (#44075) 2019-10-03 11:55:00 +03:00
dissect Remove eclipse conditionals (#44075) 2019-10-03 11:55:00 +03:00
geo Remove eclipse conditionals (#44075) 2019-10-03 11:55:00 +03:00
grok Change grok watch dog to be Matcher based instead of thread based. (#48346) 2019-10-24 15:34:01 +02:00
nio Remove eclipse conditionals (#44075) 2019-10-03 11:55:00 +03:00
plugin-classloader [Backport] Replace usages RandomizedTestingTask with built-in Gradle Test (#40978) (#40993) 2019-04-09 11:52:50 -07:00
secure-sm Remove eclipse conditionals (#44075) 2019-10-03 11:55:00 +03:00
ssl-config Remove eclipse conditionals (#44075) 2019-10-03 11:55:00 +03:00
x-content Remove eclipse conditionals (#44075) 2019-10-03 11:55:00 +03:00
build.gradle Remove eclipse conditionals (#44075) 2019-10-03 11:55:00 +03:00