-
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
The date_index_name processor calculates wrong week if index_name_format is 'yyyy-w' #41670
Comments
Pinging @elastic/es-core-features |
@yoogie - thanks for reporting this. This appears to be an issue with the date math index name resolution not the processor, and does appear to be a regression in 7.0.0. This is likely related to an internal change to start using Java (8) Time instead of Joda Time for internal time resolution. I can reproduce this without the ingest node processor with the following date math index name:
Creating an index using this expression (using the encoded form):
on 6.5 (correct):
on 7.0 (incorrect):
cc @rjernst |
Pinging @elastic/es-core-infra |
I think the week portion of the format needs to be |
I don't see that changing to 'ww' would help. It does change the number of digits, but it still outputs 01 instead of 1, but expected would is still 49 for the example I posted at the beginning. |
I think this is a bug, but it also was existing in 6.7 but not always visible. For both 6.7 and 7.0
in the example run against 7.0
If run against 6.7 |
I think this might have been introduced by https://github.com/elastic/elasticsearch/pull/39568/files#diff-37eb9be6db62fad60f8c3d35b77e91d0R153 |
Introducing a IsoLocal.ROOT constant which should be used instead of java.util.Locale.ROOT in ES when dealing with dates. IsoLocal.ROOT customises start of the week to be Monday instead of Sunday. closes #42588 an issue with investigation details relates #41670 bug raised (this won't fix it on its own. joda.parseInto has to be reimplemented closes #43275 an issue raised by community member
Introducing a IsoLocal.ROOT constant which should be used instead of java.util.Locale.ROOT in ES when dealing with dates. IsoLocal.ROOT customises start of the week to be Monday instead of Sunday. closes elastic#42588 an issue with investigation details relates elastic#41670 bug raised (this won't fix it on its own. joda.parseInto has to be reimplemented closes elastic#43275 an issue raised by community member
Introducing a IsoLocal.ROOT constant which should be used instead of java.util.Locale.ROOT in ES when dealing with dates. IsoLocal.ROOT customises start of the week to be Monday instead of Sunday. closes elastic#42588 an issue with investigation details relates elastic#41670 bug raised (this won't fix it on its own. joda.parseInto has to be reimplemented closes elastic#43275 an issue raised by community member change skip reason compile error not orking spi working unit test cleanup change providers for 9+ revert changes IsoLocale cleanup move spi files to server make unit test pass from gradle expermienting with gradle tasks uncomment jar hell check only add settings in buildplugin allign options for locale providers
Reverting the change introducing IsoLocal.ROOT and introducing IsoCalendarDataProvider that defaults start of the week to Monday and requires minimum 4 days in first week of a year. This extension is using java SPI mechanism and defaults for Locale.ROOT only. It require jvm property java.locale.providers to be set with SPI,COMPAT closes #41670
Reverting the change introducing IsoLocal.ROOT and introducing IsoCalendarDataProvider that defaults start of the week to Monday and requires minimum 4 days in first week of a year. This extension is using java SPI mechanism and defaults for Locale.ROOT only. It require jvm property java.locale.providers to be set with SPI,COMPAT closes elastic#41670
…8209) (#48349) Reverting the change introducing IsoLocal.ROOT and introducing IsoCalendarDataProvider that defaults start of the week to Monday and requires minimum 4 days in first week of a year. This extension is using java SPI mechanism and defaults for Locale.ROOT only. It require jvm property java.locale.providers to be set with SPI,COMPAT closes #41670 backport #48209
Elasticsearch version (
bin/elasticsearch --version
):Version: 7.0.0, Build: default/zip/b7e28a7/2019-04-05T22:55:32.697037Z, JVM: 1.8.0_121
Plugins installed: []
JVM version (
java -version
):java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
OS version (
uname -a
if on a Unix-like system):win7
Description of the problem including expected versus actual behavior:
Indexing a document using the date_index_name processor with
"date_rounding" : "d"
and"index_name_format": "yyyy-w"
indexes the time2017-12-04T17:00:58.580
in a index named x-2017-1 while expected index name would be x-2017-49Steps to reproduce:
Index name -> x-2017-1
If using index_name_format including month and day, the week gets correct
Index name -> x-2017-12-04-49
The text was updated successfully, but these errors were encountered: