-
Notifications
You must be signed in to change notification settings - Fork 137
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
Fast fail when reading failed in ComposedClientReadHandler #213
Conversation
Ping @frankliee Could help review this PR? If OK, I think I will go ahead. |
Like discussion at dev mail list, we will freeze the code and cut 0.6 version branch in September 15, we will not merge this pr before I cut 0.6 version branch, are you ok? |
integration-test/common/src/test/java/org/apache/uniffle/test/QuorumTest.java
Outdated
Show resolved
Hide resolved
1dc685e
to
3f78ca3
Compare
Codecov Report
@@ Coverage Diff @@
## master #213 +/- ##
============================================
- Coverage 59.10% 59.07% -0.03%
- Complexity 1326 1327 +1
============================================
Files 160 161 +1
Lines 8727 8736 +9
Branches 817 817
============================================
+ Hits 5158 5161 +3
- Misses 3303 3310 +7
+ Partials 266 265 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -80,7 +81,7 @@ private void prepareFilePath( | |||
File baseFolder = new File(fullShufflePath); | |||
if (!baseFolder.exists()) { | |||
// the partition doesn't exist in this base folder, skip | |||
throw new RuntimeException("Can't find folder " + fullShufflePath); | |||
throw new FileNotFoundException("Can't find folder " + fullShufflePath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change exception to FileNotFoundException
,this should not be thrown to client.
For example:
When using the MEMORY_LOCALFILE_HDFS type, sometime, the localfile storage may be empty due to the big event flushed to HDFS directly. So when I want to fast fail in ComposedClientReadHandler
, this problem should be involved. So this exception should be handled in server's grpc api and return the empty index result.
Ping @frankliee |
PTAL @frankliee |
|
||
package org.apache.uniffle.common.exception; | ||
|
||
public class FileNotFoundException extends RuntimeException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use Java.io.FileNotFoundException
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Java.io.FileNotFoundException
is IOException which need to catch in invoking side, so introduce this extending the RuntimeException
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do u think @frankliee
server/src/main/java/org/apache/uniffle/server/ShuffleServerGrpcService.java
Outdated
Show resolved
Hide resolved
09bb8f6
to
a323805
Compare
storage/src/main/java/org/apache/uniffle/storage/handler/impl/ComposedClientReadHandler.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @zuston @frankliee
What changes were proposed in this pull request?
Fast fail when reading failed in ComposedClientReadHandler
Why are the changes needed?
It should fast fail on network failure when reading shuffle data from memory/localfile/hdfs in
ComposedClientReadHandler
. If not, it will throw inconsistent blockIds and make users confused.Does this PR introduce any user-facing change?
No
How was this patch tested?
UTs.