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

fixed default formatter negative epoch milli errors #17487

Closed
wants to merge 1 commit into from

Conversation

kbharathy
Copy link

Description

Negative epoch millis with certain length, results with parsing exception for fields using default format ("strict_date_optional_time||epoch_millis").

negative values(-561600000, -5616000000) are parsed incorrectly with default format "strict_date_optional_time||epoch_millis".
with error message,
java.lang.ArithmeticException: long overflow

negative values(-2177434800) are parsed incorrectly with default format "strict_date_optional_time||epoch_millis"
with error message,
java.time.DateTimeException: Invalid value for Year (valid values -999999999 - 999999999): -2177434800

Fixed by reducing length from 10 to 4 - Helped to parse values correctly now.

Related Issues

Resolves #16979

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link
Contributor

❌ Gradle check result for 0272e31: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@kbharathy
Copy link
Author

Closing this PR now, need to fix related test failures.

@kbharathy kbharathy closed this Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Indexing Indexing, Bulk Indexing and anything related to indexing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Parsing exception while storing negative epoch millis with certain length.
1 participant