Skip to content
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

Implement auto-upgrade mechanism for joda-java migration #45548

Closed
pgomulka opened this issue Aug 14, 2019 · 8 comments
Closed

Implement auto-upgrade mechanism for joda-java migration #45548

pgomulka opened this issue Aug 14, 2019 · 8 comments
Labels
:Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team

Comments

@pgomulka
Copy link
Contributor

pgomulka commented Aug 14, 2019

it requires at the moment a new mapping creation and a reindex in order to fix date formats. This is a bit tedious for users, especially when their formats were compatible like
YYYY-MM-dd => yyyy-mm-dd
We should implement a mechanism that will automatically upgrade the mapping for users in situations like this. If it won't be able to confirm 100% that the mapping can be autoupgraded, it should not do any action and user would be forced to create new mapping/reindex (as he has to now)
We could consider to allow mapping modifications for these fields. Or use a reindex with alias to allow smooth migration (and still allowing to index documents)

@pgomulka pgomulka added the :Core/Infra/Core Core issues without another label label Aug 14, 2019
@pgomulka pgomulka self-assigned this Aug 14, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@pgomulka
Copy link
Contributor Author

pgomulka commented Dec 3, 2019

I wonder to what degree this should be automatic. It might be easy to implement a simple regexp where yyyy is replaced with uuuu (assuming no custom text (') was used in a pattern)
but allowing more complex patterns might end up fairly complex

@pgomulka
Copy link
Contributor Author

pgomulka commented Dec 4, 2019

Similar logic that allows reindex exists at the moment in kibana but there is plan to migrate some of this to ES plugin.
Maybe we could implement a mechanism that would make it easier to perform such migrations in the future?
elastic/kibana#49764

@rjernst
Copy link
Member

rjernst commented Dec 4, 2019

I wonder to what degree this should be automatic

I don't think we can do this automatically since we can't distinguish when they actually wanted yyyy?

@pgomulka
Copy link
Contributor Author

pgomulka commented Dec 4, 2019

I thought this change would go to 6.8 where the context of pattern without of an 8 prefix should be clear
so if they had YYYY then after autoupgrade they would have 8yyyy

@richiejarvis
Copy link

I wonder to what degree this should be automatic

I don't think we can do this automatically since we can't distinguish when they actually wanted yyyy?

I think it is safe to assume that if the format yyyy was used successfully under joda time, then it should be auto translated to the equivilent in the new library. That will give consistent behaviour with how the format worked before.

In other words, if it was wrong previously, it will be wrong after the change as well, but in a consistent manner.

Cheers,

Richie

@rjernst rjernst added the Team:Core/Infra Meta label for core/infra team label May 4, 2020
@rjernst rjernst added the needs:triage Requires assignment of a team area label label Dec 3, 2020
@williamrandolph
Copy link
Contributor

@pgomulka Is this work still planned? Since we are now developing 7.x and 8.x, I am not sure if an upgrade mechanism for 6.8.x will be useful.

@williamrandolph williamrandolph removed the needs:triage Requires assignment of a team area label label Jan 6, 2021
@rjernst
Copy link
Member

rjernst commented Aug 7, 2024

Given that we haven't had anymore requests for this in many years, and we are fully using Java time formats, I'm going to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team
Projects
None yet
Development

No branches or pull requests

5 participants