Skip to content

Overflow prevention when handling date values#16812

Merged
prudhvigodithi merged 1 commit intoopensearch-project:mainfrom
prudhvigodithi:long-overflow
Dec 9, 2024
Merged

Overflow prevention when handling date values#16812
prudhvigodithi merged 1 commit intoopensearch-project:mainfrom
prudhvigodithi:long-overflow

Conversation

@prudhvigodithi
Copy link
Copy Markdown
Member

@prudhvigodithi prudhvigodithi commented Dec 9, 2024

Description

Coming from #16709 (comment) added a precaution to handle extreme date values during sorting to prevent arithmetic_exception: long overflow.

Related Issues

#16709 and #5713.

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.

@prudhvigodithi
Copy link
Copy Markdown
Member Author

Added a test based on similar scenario mentioned here #16709 (comment).

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 9, 2024

❌ Gradle check result for 8f297cb: 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?

Copy link
Copy Markdown
Contributor

@msfroh msfroh left a comment

Choose a reason for hiding this comment

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

Thanks, @prudhvigodithi ! The change makes sense to me. Good catch!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 9, 2024

❌ Gradle check result for 476ed76: 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?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 9, 2024

✅ Gradle check result for 79cc71a: SUCCESS

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.05%. Comparing base (42dc22e) to head (0d6882e).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main   #16812   +/-   ##
=========================================
  Coverage     72.05%   72.05%           
+ Complexity    65183    65140   -43     
=========================================
  Files          5318     5318           
  Lines        303993   304003   +10     
  Branches      43990    43992    +2     
=========================================
+ Hits         219028   219043   +15     
+ Misses        67046    66996   -50     
- Partials      17919    17964   +45     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread server/src/main/java/org/opensearch/common/time/DateUtils.java Outdated
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 9, 2024

✅ Gradle check result for 0d6882e: SUCCESS

@prudhvigodithi prudhvigodithi merged commit 5ba909a into opensearch-project:main Dec 9, 2024
opensearch-trigger-bot Bot pushed a commit that referenced this pull request Dec 9, 2024
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
(cherry picked from commit 5ba909a)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
prudhvigodithi pushed a commit that referenced this pull request Dec 10, 2024
(cherry picked from commit 5ba909a)

Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
mingshl pushed a commit to mingshl/OpenSearch-Mingshl that referenced this pull request Dec 16, 2024
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
mingshl pushed a commit to mingshl/OpenSearch-Mingshl that referenced this pull request Dec 16, 2024
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
Signed-off-by: Mingshi Liu <mingshl@amazon.com>
akolarkunnu pushed a commit to akolarkunnu/OpenSearch that referenced this pull request Jan 21, 2025
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.x Backport to 2.x branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants