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

rjernst
Copy link
Member

@rjernst rjernst 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

This commit partially reverts elastic#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 elastic#36602
@rjernst rjernst added >bug :Core/Infra/Core Core issues without another label v7.0.0 v6.6.0 labels Dec 19, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@rjernst rjernst requested a review from spinscale December 19, 2018 04:12
@spinscale
Copy link
Contributor

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)));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

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 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
@rjernst rjernst deleted the timeapi24 branch December 19, 2018 19:20
rjernst added a commit that referenced this pull request 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
rjernst added a commit that referenced this pull request 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
@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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rework multi date formatter merging causes a throughput drop for http_logs
5 participants