-
Notifications
You must be signed in to change notification settings - Fork 915
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
Translate column size overflow exception to JNI #13911
Merged
rapids-bot
merged 4 commits into
rapidsai:branch-23.10
from
mythrocks:column-overflow-jni
Aug 21, 2023
Merged
Translate column size overflow exception to JNI #13911
rapids-bot
merged 4 commits into
rapidsai:branch-23.10
from
mythrocks:column-overflow-jni
Aug 21, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When a CUDF operation causes a column's row count to exceed the size limit imposed by `cudf::size_type`, the operation throws a `std::overflow_error` exception. However, prior to this commit, CUDF JNI did not translate this to a separate Java exception. Because of handling this condition as any generic exception, there was no way to attempt case specific recovery for overflow conditions. This commit translates `std::overflow_error` into a new Java exception (`CudfColumnOverflowException`) that may be caught in user space to attempt recovery/retry. Signed-off-by: MithunR <[email protected]>
mythrocks
added
feature request
New feature or request
3 - Ready for Review
Ready for review by team
Java
Affects Java cuDF API.
Spark
Functionality that helps Spark RAPIDS
non-breaking
Non-breaking change
labels
Aug 17, 2023
ttnghia
reviewed
Aug 17, 2023
java/src/main/java/ai/rapids/cudf/CudfColumnOverflowException.java
Outdated
Show resolved
Hide resolved
gerashegalov
approved these changes
Aug 18, 2023
ttnghia
approved these changes
Aug 18, 2023
mythrocks
added a commit
to mythrocks/spark-rapids
that referenced
this pull request
Aug 21, 2023
Depends on rapidsai/cudf#13911. When a CUDF operation causes a column's size to exceed the valid range for CUDF columns (i.e. cudf::size_type), CUDF will throw an exception. Prior to this commit, the `RmmRapidsRetryIterator` does not attempt retries with smaller splits, in this case. Instead, the overflow is treated as a generic exception. This commit allows the RmmRapidsRetryIterator to recognize the exception specific to the overflow case (i.e. `CudfColumnSizeOverflowException`), and attempt a split-retry. Note: This error condition is difficult to reproduce. The catch/retry is a "best effort" attempt not to fail the entire task. Signed-off-by: MithunR <[email protected]>
mythrocks
added a commit
to mythrocks/spark-rapids
that referenced
this pull request
Aug 21, 2023
Depends on rapidsai/cudf#13911. When a CUDF operation causes a column's size to exceed the valid range for CUDF columns (i.e. cudf::size_type), CUDF will throw an exception. Prior to this commit, the `RmmRapidsRetryIterator` does not attempt retries with smaller splits, in this case. Instead, the overflow is treated as a generic exception. This commit allows the RmmRapidsRetryIterator to recognize the exception specific to the overflow case (i.e. `CudfColumnSizeOverflowException`), and attempt a split-retry. Note: This error condition is difficult to reproduce. The catch/retry is a "best effort" attempt not to fail the entire task. Signed-off-by: MithunR <[email protected]>
/merge |
Thank you for the reviews, @ttnghia, @gerashegalov. This change is now merged. |
mythrocks
added a commit
to mythrocks/spark-rapids
that referenced
this pull request
Aug 24, 2023
Depends on rapidsai/cudf#13911. When a CUDF operation causes a column's size to exceed the valid range for CUDF columns (i.e. cudf::size_type), CUDF will throw an exception. Prior to this commit, the `RmmRapidsRetryIterator` does not attempt retries with smaller splits, in this case. Instead, the overflow is treated as a generic exception. This commit allows the RmmRapidsRetryIterator to recognize the exception specific to the overflow case (i.e. `CudfColumnSizeOverflowException`), and attempt a split-retry. Note: This error condition is difficult to reproduce. The catch/retry is a "best effort" attempt not to fail the entire task. Signed-off-by: MithunR <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3 - Ready for Review
Ready for review by team
feature request
New feature or request
Java
Affects Java cuDF API.
non-breaking
Non-breaking change
Spark
Functionality that helps Spark RAPIDS
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When a CUDF operation causes a column's row count to exceed the size limit imposed by
cudf::size_type
, the operation throws astd::overflow_error
exception. However, prior to this commit, CUDF JNI did not translate this to a separate Java exception. Because of handling this condition as any generic exception, there was no way to attempt case specific recovery for overflow conditions.This commit translates
std::overflow_error
into a new Java exception (CudfColumnOverflowException
) that may be caught in user space to attempt recovery/retry.This is a non-breaking change. The user-facing change is minimal in that existing failure handling based on catching
CudfException
will continue to work as before. The user will now have more fine grained error handling by catchingCudfColumnOverflowException
.Checklist