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

Core: Revert back to joda's multi date formatters #36814

Merged
merged 5 commits into from Dec 19, 2018

Conversation

Projects
None yet
5 participants
@rjernst
Copy link
Member

commented Dec 19, 2018

This commit partially reverts #36447 by using the ability of Joda time's
DateTimeFormatterBuilder to append multiple parsers instead of using the
MergedDateFormatter. The MergedDateFormatter will be removed in a future
change, as it is not as performant due to creating potentially many
exceptions during heavy date parsing. This change is a stop-gap until
that followup is ready.

closes #36602

Core: Revert back to joda's multi date formatters
This commit partially reverts #36447 by using the ability of Joda time's
DateTimeFormatterBuilder to append multiple parsers instead of using the
MergedDateFormatter. The MergedDateFormatter will be removed in a future
change, as it is not as performant due to creating potentially many
exceptions during heavy date parsing. This change is a stop-gap until
that followup is ready.

closes #36602
@elasticmachine

This comment has been minimized.

Copy link

commented Dec 19, 2018

@rjernst rjernst requested a review from spinscale Dec 19, 2018

@spinscale

This comment has been minimized.

Copy link
Member

commented Dec 19, 2018

there is also an open issue in 6.x regarding exception handling that needs to be properly handled by this to retain BWC #36598

formatter = Joda.forPattern(pattern);
}
formatters.add(formatter);
formatters.add(DateFormatters.forPattern(pattern.substring(1)));

This comment has been minimized.

Copy link
@spinscale

spinscale Dec 19, 2018

Member

this needs a check for each of the pattern if it starts with 8 in order to return the proper joda time pattern for sth like 8date_optional_time||date_optional_time

This comment has been minimized.

Copy link
@rjernst

rjernst Dec 19, 2018

Author Member

Oops, this is leftover. We won't be able to have mixed joda/java formats, so I think only having 8 as the very first character is sufficient (otherwise it would be redundant). I'll move the substring to outside the loop.

@spinscale

This comment has been minimized.

Copy link
Member

commented Dec 19, 2018

my suggestion to fix is this one spinscale@6b7b130 (there is one last case not covered yet, namely foo||8foo though)

@jasontedor jasontedor added v6.7.0 and removed v6.6.0 labels Dec 19, 2018

rjernst added some commits Dec 19, 2018

@rjernst rjernst added v6.6.0 and removed v6.7.0 labels Dec 19, 2018

@rjernst rjernst merged commit c85c16b into elastic:master Dec 19, 2018

7 checks passed

CLA Commit author is a member of Elasticsearch
Details
elasticsearch-ci-1 Build finished.
Details
elasticsearch-ci-2 Build finished.
Details
elasticsearch-ci/default-distro Build finished.
Details
elasticsearch-ci/docbldesx Build finished.
Details
elasticsearch-ci/oss-distro-docs Build finished.
Details
elasticsearch-ci/packaging-sample Build finished.
Details

@rjernst rjernst deleted the rjernst:timeapi24 branch Dec 19, 2018

rjernst added a commit that referenced this pull request Dec 19, 2018

Core: Revert back to joda's multi date formatters (#36814)
This commit partially reverts #36447 by using the ability of Joda time's
DateTimeFormatterBuilder to append multiple parsers instead of using the
MergedDateFormatter. The MergedDateFormatter will be removed in a future
change, as it is not as performant due to creating potentially many
exceptions during heavy date parsing. This change is a stop-gap until
that followup is ready.

closes #36602

rjernst added a commit that referenced this pull request Dec 19, 2018

Core: Revert back to joda's multi date formatters (#36814)
This commit partially reverts #36447 by using the ability of Joda time's
DateTimeFormatterBuilder to append multiple parsers instead of using the
MergedDateFormatter. The MergedDateFormatter will be removed in a future
change, as it is not as performant due to creating potentially many
exceptions during heavy date parsing. This change is a stop-gap until
that followup is ready.

closes #36602

@rjernst rjernst added the v6.7.0 label Dec 19, 2018

@jimczi jimczi added v7.0.0-beta1 and removed v7.0.0 labels Feb 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.