-
Notifications
You must be signed in to change notification settings - Fork 304
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
HPCC-33064 Check files size consistency before reading #19329
Conversation
Signed-off-by: Gavin Halliday <[email protected]>
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-33064 Jirabot Action Result: |
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.
@ghalliday - looks good, trivial comments only.
It looks safe, do slightly wonder whether there should be a config option to make this optional, JIC.
if (expectedSize != unknownFileSize) | ||
{ | ||
offset_t actualSize = inputfile->size(); | ||
if(actualSize != expectedSize) |
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.
trivial/formatting: space after if
{ | ||
offset_t actualSize = inputfile->size(); | ||
if(actualSize != expectedSize) | ||
throw MakeStringException(0, "File size mismatch: file %s was supposed to be %" I64F "d bytes but appears to be %" I64F "d bytes", inputfile->queryFilename(), expectedSize, actualSize); |
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.
trivial: makeStringExceptionV
{ | ||
offset_t actualSize = iFile->size(); | ||
if(actualSize != expectedSize) | ||
throw MakeStringException(0, "File size mismatch: file %s was supposed to be %" I64F "d bytes but appears to be %" I64F "d bytes", iFile->queryFilename(), expectedSize, actualSize); |
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.
trivial/formatting: space between if/(actualSize
MakeStringException -> makeStringExceptionV
7f3f269
into
hpcc-systems:candidate-9.6.x
Jirabot Action Result: |
Type of change:
Checklist:
Smoketest:
Testing: