-
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-32649 Avoid writing any data to an empty compressed file #19108
Conversation
Push for regression testing. |
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-32649 Jirabot Action Result: |
system/jlib/jlzw.cpp
Outdated
trailer.crc = ~0U; | ||
indexbuf.append(sizeof(trailer),&trailer); | ||
//Avoid writing out a header/footer if the file is empty | ||
if (indexbuf.length() != 0) |
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.
would testing trailer.expandedSize == 0 be better and mean can avoid call to flush() (on line 2458)
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.
flush returns immediately, but I think you're right it would be clearer.
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 - 1 question.
Also, perhaps should add a configurable option now (disabled by default), so we can merge the code, but enable it later?
52ed29d
to
16dcf3b
Compare
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-32649 Jirabot Action Result: |
@jakesmith repushed and rebased. |
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.
system/jlib/jlzw.cpp
Outdated
} | ||
catch (IException *e) // handle cases where config. not available | ||
{ | ||
EXCLOG(e, "doRename"); |
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.
"allowZeroSizeCompressedFiles" ?
Signed-off-by: Gavin Halliday <[email protected]>
Jirabot Action Result: |
Type of change:
Checklist:
Smoketest:
Testing: