-
Notifications
You must be signed in to change notification settings - Fork 24
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
HPCC4J-540 Missing file error during publish #640
Conversation
- Corrected error handling on prefetch thread to pass errors on startup - Fixed potential data race in exception handling - Added invalid signature test Signed-off-by: James McMullan [email protected]
@rpastrana please review |
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.
@jpmcmu a few mostly minor comments
@@ -294,6 +294,13 @@ public boolean hasNext() | |||
try | |||
{ | |||
rslt = this.binaryRecordReader.hasNext(); | |||
|
|||
// Has next may not catch the prefetch exception if it occurs at the beginning of a read | |||
// This is due to InputStream.hasNext() being allowed to through an IOException when closed. |
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.
Glad to see this comment, it's very helpful,
very minor: spelling in comment, should be throw
@@ -1148,6 +1165,11 @@ public int available() throws IOException | |||
// Do the check for closed first here to avoid data races | |||
if (this.closed.get()) | |||
{ | |||
if (this.prefetchException != null) | |||
{ | |||
throw new IOException("", this.prefetchException); |
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.
is there any helpful info that should be added to this exception?
// We are expecting a failure | ||
if (readException != null) | ||
{ | ||
System.out.println("Test passed with exception: " + readException.getMessage()); |
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.
Minor, but as worded, it could give the wrong impression that the test passed in spite of the exception. Perhaps: "Test passed with expected exception"
Signed-off-by: James McMullan [email protected]
Type of change:
Checklist:
Testing: