-
Notifications
You must be signed in to change notification settings - Fork 306
HPCC-34144 Remove code for CRC calculation when writing and reading files #19876
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
base: master
Are you sure you want to change the base?
Conversation
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-34144 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.
Pull Request Overview
This PR removes CRC calculation logic from file reading and writing routines in the HPCC codebase, in accordance with the HPCC-34144 issue. The changes include the removal of CRC checks and tallying across various disk I/O activities and related helper functions, while introducing an option to verify file dates.
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
thorlcr/thorutil/thormisc.hpp | Added a new option (THOROPT_CHECK_FILE_DATES) for file date verification and a minor comment typo |
thorlcr/thorutil/thmem.cpp | Updated flush() calls by removing unused parameters |
thorlcr/activities/* | Removed CRC tallies and related logic in XML read/write, disk read/write, spill, and CSV activities |
system/jlib/jfile.hpp & jfile.cpp | Revised serial stream creation functions to remove deprecated callback parameters |
ecl/hthor/hthor.cpp | Removed flush() calls with NULL for CRC |
common/thorhelper/thorcommon.* | Removed rw_crc flag and adjusted row stream writer interfaces accordingly |
482dea8
to
aebe1e5
Compare
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.
Looks fine. Two minor questions.
} | ||
virtual void reset(offset_t _offset, offset_t _flen) | ||
{ | ||
in->reset(_offset, _flen); |
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.
Question: Should the CRC be (somehow) modified/adjusted/discarded when reset() is called? IFileSerialStreamCallback does not support anything like that, but should it?
virtual void skip(size32_t sz) override | ||
{ | ||
throwUnexpectedX("Skip called on an input stream that is being tallied"); | ||
in->skip(sz); |
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.
Will this line ever be hit?
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.
code now deleted.
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 - a good clearout. I didn't spot it in review, but it's causing some regression tests to fail.
@@ -138,7 +132,7 @@ class SpillSlaveActivity : public CSlaveActivity | |||
Owned<IFile> ifile = createIFile(fileName.str()); | |||
offset_t sz = ifile->size(); | |||
mb.append(getDataLinkCount()).append(compress?uncompressedBytesWritten:sz).append(sz); | |||
unsigned crc = compress?~0:fileCRC.get(); | |||
unsigned crc = ~0; | |||
mb.append(crc); |
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 be good to get rid of this unused serialization element at the same time?
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.
done - as part of fixing the thor problems.
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.
I didn't understand the relevance of the last commit (Fix issues related to modified time granularity in roxie), but discussed offline.
Maybe worth clarifying in the squashed commit message.
Type of change:
Checklist:
Smoketest:
Testing: