-
Notifications
You must be signed in to change notification settings - Fork 25k
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
[CI] SimpleQueryStringBuilderTests.testToQuery failure #43112
Comments
Pinging @elastic/es-search |
Note: reproduces on 7.2 but not on 7.x for me with the above seed. |
The problem is an edge case where the above query is marked as cachable, but out test logic says its not, most likely because of the |
For this query in particular:
the test framework assumes it should be cacheable (the check in https://github.com/elastic/elasticsearch/blob/7.2/server/src/test/java/org/elasticsearch/index/query/FullTextQueryTestCase.java#L39 lowercases the query term before checking the prefix for "now") but in reality the JavaDateMathParser (and also the legacy Joda one) only handle now (and thus flip the "cacheable" flag in the seach context) when the prefix is an exact match (no lowercasing). I tried changing Looking at this I think we push too hard on the randomization and handling all edge cases in a generic way in these tests. I think we should exclude query terms that start with "now" in whatever case variation from the general test cases and by that avoid the tricky caching detection problems and instead add dedicated tests case just for these edge cases. |
Do you have an example of this ? I could not think of a case where we'd modify the original term before feeding it to an analyzer.
I agree, if this turns too complicated we can ensure that the random query string doesn't start with |
We discussed offline and since we also randomize the forced |
Currently the randomization of the q.b. in these tests can create query strings that can cause caching to be disabled for this query if we query all fields and there is a date field present. This is pretty much an anomaly that we shouldn't generally test for in the "testToQuery" tests where cache policies are checked. This change makes sure we don't create offending query strings so the cache checks never hit these cases and adds a special test method to check this edge case. Closes elastic#43112
…43199) Currently the randomization of the q.b. in these tests can create query strings that can cause caching to be disabled for this query if we query all fields and there is a date field present. This is pretty much an anomaly that we shouldn't generally test for in the "testToQuery" tests where cache policies are checked. This change makes sure we don't create offending query strings so the cache checks never hit these cases and adds a special test method to check this edge case. Closes #43112
…43199) Currently the randomization of the q.b. in these tests can create query strings that can cause caching to be disabled for this query if we query all fields and there is a date field present. This is pretty much an anomaly that we shouldn't generally test for in the "testToQuery" tests where cache policies are checked. This change makes sure we don't create offending query strings so the cache checks never hit these cases and adds a special test method to check this edge case. Closes #43112
…43199) Currently the randomization of the q.b. in these tests can create query strings that can cause caching to be disabled for this query if we query all fields and there is a date field present. This is pretty much an anomaly that we shouldn't generally test for in the "testToQuery" tests where cache policies are checked. This change makes sure we don't create offending query strings so the cache checks never hit these cases and adds a special test method to check this edge case. Closes #43112
SimpleQueryStringBuilderTests.testToQuery
failed in a 7.2 build: https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+7.2+matrix-java-periodic/ES_BUILD_JAVA=openjdk12,ES_RUNTIME_JAVA=zulu8,nodes=immutable&&linux&&docker/13/consoleThe error is:
This reliably reproduces on the 7.2 branch using this command:
So it seems like a seed-specific failure.
The text was updated successfully, but these errors were encountered: