You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following index formation mask is used "provided_name": "<indexname-{now/d{YYYY.MM.dd}}-002368>"
in the last week of 2024, the placeholder "YYYY" was replaced with 2025 instead of 2024.
Probably, the week number is used to obtain the year value. December 30 and 31, 2024 had week number 1 because the rest of the week was already in 2025.
Related component
Other
To Reproduce
1 Create new index PUT /%3Cindex-%7Bnow%2Fd%7BYYYY.MM.dd%7D%7D-000001%3E
2 Create State Management policy with "rollover" and add this policy on index
3 Set system date and time on the last week of 2024 (or wait until the end of 2025 :) )
4 Rollover index and see name new index
Expected behavior
YYYY should be replaced this year
Additional Details
Version OpenSearch 2.18.0
The text was updated successfully, but these errors were encountered:
It looks like this changed as a result of the migration from Joda time to Java's built-in datetime formats. I found the relevant documentation for each:
On Joda, YYYY means "year of era (>=0)". In Java time, it means "week-based-year".
It looks like yyyy or uuuu should work, though.
@mousemaxx -- while it doesn't help with your indexes that rolled over recently, does that help for next year? Also, do you know if we have some bad documentation somewhere?
I'm going to close this issue as "by design", but if we're documenting the formats incorrectly somewhere, we should fix that.
@msfroh, Thanks for the explanation. I'll fix all the templates. The current documentation is fine, my indexes are very old (more than 2 years). I don’t even remember where exactly I got such an index mask, it didn’t cause any problems before.
Describe the bug
The following index formation mask is used

"provided_name": "<indexname-{now/d{YYYY.MM.dd}}-002368>"
in the last week of 2024, the placeholder "YYYY" was replaced with 2025 instead of 2024.
Probably, the week number is used to obtain the year value. December 30 and 31, 2024 had week number 1 because the rest of the week was already in 2025.
Related component
Other
To Reproduce
1 Create new index
PUT /%3Cindex-%7Bnow%2Fd%7BYYYY.MM.dd%7D%7D-000001%3E
2 Create State Management policy with "rollover" and add this policy on index
3 Set system date and time on the last week of 2024 (or wait until the end of 2025 :) )
4 Rollover index and see name new index
Expected behavior
YYYY should be replaced this year
Additional Details
The text was updated successfully, but these errors were encountered: