-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
FieldSortIT.testCastDate fails reproducibly #63719
Comments
Pinging @elastic/es-search (:Search/Search) |
I have not investigated this from core/infra perspective yet, but looks like |
also the assertion seems to be almost right
somehow it is singular in the exception thrown
|
Just see another one today: gradlew ':server:internalClusterTest' --tests "org.elasticsearch.search.sort.FieldSortIT.testCastDate"
|
I saw this fail on a community PR I'm reviewing:
It did not reproduce locally against master for me with that command. |
There seems to be a timing issue here. If I add the seed to the test and debug into the method and take my time when I step over stuff it works. But if I just run it then it doesn't. |
I think this comes because the "bottom" sort values from other shards are in millis and the field that has nanos gets confused. |
Relates to elastic#63719
I checked the time frame when this error started to appear quite frequently on master and found #63520 which would fit also because it wasn't backported to 7.11 yet (failures currently only on master), its related to shard exception and the test that fails uses "setAllowPartialSearchResults(false)" for the request. I will continue digging. |
This indeed seems a race between which shard exceptions get thrown first. Before #63520 we'd get two types of exceptions, namely
Before #63520 we would always get both exceptions, so the check for the first type that the test expects always succeeds. With #63520 we can get unlucky and the task is cancelled before the expected exception is thrown (due to the other shard exception) I'm currently looking at the way FieldSortBuilder#isBottomSortShardDisjoint is supposed to behave on empty shards with nanos, since using Long.MAX_VALUE as an upper limit here doesn't seem to be right in the first place. |
The formatting of the global bottom value does not take the resolution of the provided numeric_type into account. This change fixes this bug by providing the resolution directly in the doc value format if the numeric_type is provided as `date_nanos`. Closes elastic#63719
The formatting of the global bottom value does not take the resolution of the provided numeric_type into account. This change fixes this bug by providing the resolution directly in the doc value format if the numeric_type is provided as `date_nanos`. Closes #63719
The formatting of the global bottom value does not take the resolution of the provided numeric_type into account. This change fixes this bug by providing the resolution directly in the doc value format if the numeric_type is provided as `date_nanos`. Closes #63719
The formatting of the global bottom value does not take the resolution of the provided numeric_type into account. This change fixes this bug by providing the resolution directly in the doc value format if the numeric_type is provided as `date_nanos`. Closes #63719
Build scan:
https://gradle-enterprise.elastic.co/s/jtddpibu72kzs
Repro line:
./gradlew ':server:internalClusterTest' --tests "org.elasticsearch.search.sort.FieldSortIT.testCastDate" -Dtests.seed=6F58A9AF4FD8005F -Dtests.security.manager=true -Dtests.locale=zh -Dtests.timezone=Asia/Qyzylorda -Druntime.java=11 -Dtests.fips.enabled=true
Reproduces locally?:
yes
Applicable branches:
master (have not checked others)
Failure history:
Failure excerpt:
Caused by: java.lang.IllegalArgumentException: date[+54280952-03-25T07:12:55.807Z] is after 2262-04-11T23:47:16.854775807 and cannot be stored in nanosecond resolution
07:27:18 at org.elasticsearch.common.time.DateUtils.toLong(DateUtils.java:224)
07:27:18 at org.elasticsearch.index.mapper.DateFieldMapper$Resolution$2.convert(DateFieldMapper.java:107)
07:27:18 at org.elasticsearch.index.mapper.DateFieldMapper$DateFieldType.parseToLong(DateFieldMapper.java:431)
07:27:18 at org.elasticsearch.index.mapper.DateFieldMapper$DateFieldType.isFieldWithinQuery(DateFieldMapper.java:462)
07:27:18 at org.elasticsearch.search.sort.FieldSortBuilder.isBottomSortShardDisjoint(FieldSortBuilder.java:403)
07:27:18 at org.elasticsearch.search.internal.ShardSearchRequest$RequestRewritable.rewrite(ShardSearchRequest.java:448)
07:27:18 at org.elasticsearch.search.internal.ShardSearchRequest$RequestRewritable.rewrite(ShardSearchRequest.java:429)
07:27:18 at org.elasticsearch.index.query.Rewriteable.rewrite(Rewriteable.java:68)
07:27:18 at org.elasticsearch.search.SearchService.canMatch(SearchService.java:1183)
07:27:18 at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:392)
07:27:18 at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:383)
07:27:18 at org.elasticsearch.search.SearchService.lambda$rewriteAndFetchShardRequest$7(Sea
The text was updated successfully, but these errors were encountered: