-
Notifications
You must be signed in to change notification settings - Fork 138
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
Fix: ml/engine/utils/FileUtils casts long file length to int incorrectly #3198
Conversation
ml-algorithms/src/main/java/org/opensearch/ml/engine/utils/FileUtils.java
Show resolved
Hide resolved
Should we create an issue for this and link it to the PR? @ylwu-amzn Edit: I see that it is here already #3197 |
@maxlepikhin in every commit, you need to commit with your sign off using Your last two commits are missing sign off, you can fix it by the following:
|
Seems need to run spotlessApply |
Signed-off-by: Max Lepikhin <[email protected]>
Signed-off-by: Max Lepikhin <[email protected]>
Signed-off-by: Max Lepikhin <[email protected]>
Hey @maxlepikhin ! Just curious, how did you debug this? |
By reading the code. |
From 11/17/22 (bfb0748): all releases it seems. It'd be great if somebody from the maintainers can help the tests pass, are they flaky? |
It's a flaky test. Created the issue to track it. Approved.
|
Ok, thanks @mingshl . How to rerun it or override to submit? |
Can maintainers advise how to either re-run flaky tests or override the results to submit this PR? |
Hey Max @maxlepikhin will reach out to my team to rerun the workflow. Thank you for your patience, as of now only maintainers can rerun the workflow. |
ml-algorithms/src/test/java/org/opensearch/ml/engine/utils/FileUtilsTest.java
Show resolved
Hide resolved
I tried to re-run the workflow, but github isn't letting me to do that. May be you can push another commit based on the provided suggestion which will run workflow again. |
Signed-off-by: Max Lepikhin <[email protected]>
…tly (#3198) * Use longs when splitting model zip file Signed-off-by: Max Lepikhin <[email protected]> * add test Signed-off-by: Max Lepikhin <[email protected]> * spotless Signed-off-by: Max Lepikhin <[email protected]> * clean up test Signed-off-by: Max Lepikhin <[email protected]> --------- Signed-off-by: Max Lepikhin <[email protected]> (cherry picked from commit e7e0dff)
…tly (#3198) (#3269) * Use longs when splitting model zip file Signed-off-by: Max Lepikhin <[email protected]> * add test Signed-off-by: Max Lepikhin <[email protected]> * spotless Signed-off-by: Max Lepikhin <[email protected]> * clean up test Signed-off-by: Max Lepikhin <[email protected]> --------- Signed-off-by: Max Lepikhin <[email protected]> (cherry picked from commit e7e0dff) Co-authored-by: Max Lepikhin <[email protected]>
…tly (opensearch-project#3198) * Use longs when splitting model zip file Signed-off-by: Max Lepikhin <[email protected]> * add test Signed-off-by: Max Lepikhin <[email protected]> * spotless Signed-off-by: Max Lepikhin <[email protected]> * clean up test Signed-off-by: Max Lepikhin <[email protected]> --------- Signed-off-by: Max Lepikhin <[email protected]>
…tly (opensearch-project#3198) * Use longs when splitting model zip file Signed-off-by: Max Lepikhin <[email protected]> * add test Signed-off-by: Max Lepikhin <[email protected]> * spotless Signed-off-by: Max Lepikhin <[email protected]> * clean up test Signed-off-by: Max Lepikhin <[email protected]> --------- Signed-off-by: Max Lepikhin <[email protected]> Signed-off-by: tkykenmt <[email protected]>
Description
"(int) file.length()" makes length negative for file sizes greater than 2GB (but less than 4GB). This results in function returning empty list of chunks and model registration task being stuck in CREATED state.
The fix is to use longs when splitting model zip file. Tested locally that updated opensearch-ml-algorithms jar fixes the problem.
Bug: #3197
Related Issues
N/A
Check List
--signoff
.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.