OpenSearch/x-pack/plugin/sql
Marios Trivyzas d5b0badeb7
SQL: Remove CircuitBreaker from parser (#41835)
The CircuitBreaker was introduced as means of preventing a
`StackOverflowException` during the build of the AST by the parser.

The ANTLR4 grammar causes a weird behaviour for a Parser Listener.
The `enterEveryRule()` method is often called with a different parsing
context than the respective `exitEveryRule()`. This makes it difficult
to keep track of the tree's depth, and a custom Map was used as an
attempt of matching the contextes as they are encounter during `enter`
and during `exit` of the rules.

This approach had 2 important drawbacks:
1. It's hard to maintain this custom Map as the grammar changes.
2. The CircuitBreaker could often lead to false positives which caused
valid queries to return an Exception and prevent them from executing.

So, this removes completely the CircuitBreaker which is replaced be
a simple handling of the `StackOverflowException`

Fixes: #41471
(cherry picked from commit 1559a8e2dbd729138b52e89b7e80264c9f4ad1e7)
2019-05-07 23:25:37 +03:00
..
jdbc Mute testDriverConfigurationWithSSLInURL 2019-04-25 17:52:57 -04:00
qa [DOCS] Add space to fix Asciidoctor output (#41579) 2019-04-26 12:13:33 -04:00
sql-action SQL: Add multi_value_field_leniency inside FieldHitExtractor (#40113) 2019-03-18 14:56:03 +02:00
sql-cli [Backport] Replace usages RandomizedTestingTask with built-in Gradle Test (#40978) (#40993) 2019-04-09 11:52:50 -07:00
sql-client SQL: Prefer resultSets over exceptions in metadata (#40641) 2019-04-08 16:45:34 +03:00
sql-proto SQL: Introduce SQL TIME data type (#39802) 2019-04-01 23:57:27 +02:00
src SQL: Remove CircuitBreaker from parser (#41835) 2019-05-07 23:25:37 +03:00
build.gradle [Backport] Replace usages RandomizedTestingTask with built-in Gradle Test (#40978) (#40993) 2019-04-09 11:52:50 -07:00