Skip to content
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

Merged
merged 2 commits into from
Sep 8, 2023

Conversation

jpmcmu
Copy link
Contributor

@jpmcmu jpmcmu commented Sep 6, 2023

  • 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]

Type of change:

  • This change is a bug fix (non-breaking change which fixes an issue).
  • This change is a new feature (non-breaking change which adds functionality).
  • This change is a breaking change (fix or feature that will cause existing behavior to change).

Checklist:

  • I have created a corresponding JIRA ticket for this submission
  • My code follows the code style of this project.
    • I have applied the Eclipse code-format template provided.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly, or...
    • I have created a JIRA ticket to update the documentation.
    • Any new interfaces or exported functions are appropriately commented.
  • I have read the HPCC Systems CONTRIBUTORS document (https://github.com/hpcc-systems/HPCC-Platform/wiki/Guide-for-contributors).
  • The change has been fully tested:
    • This change does not cause any existing JUnits to fail.
    • I have include JUnit coverage to test this change
    • I have performed system test and covered possible regressions and side effects.
  • I have given due consideration to all of the following potential concerns:
    • Scalability
    • Performance
    • Security
    • Thread-safety
    • Premature optimization
    • This change fixes the problem, not just the symptom

Testing:

- 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]
@jpmcmu jpmcmu changed the base branch from master to candidate-9.2.x September 6, 2023 13:14
@jpmcmu
Copy link
Contributor Author

jpmcmu commented Sep 6, 2023

@rpastrana please review

@jpmcmu jpmcmu closed this Sep 6, 2023
@jpmcmu jpmcmu reopened this Sep 6, 2023
Copy link
Member

@rpastrana rpastrana left a 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.
Copy link
Member

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);
Copy link
Member

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());
Copy link
Member

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"

@rpastrana rpastrana merged commit d67e4b7 into hpcc-systems:candidate-9.2.x Sep 8, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants