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
Increase checksum noting and matching for imports. #890
Conversation
@@ -632,6 +632,7 @@ def update_table(self, columns): | |||
column_report[column.name] = len(column.values) | |||
log.debug("Column report: %r" % column_report) | |||
self.table.addData(columns) | |||
self.table.close() |
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.
causes SHA1 to be written for the table file
Adding
|
That's interesting. I'm guessing that Eclipse's 1.5 compliance checking goes as far as the core language but doesn't do anything clever with APIs, then. I'll have to watch out for that. Of course, I'll provide a fix. |
Label didn't get removed for today. @mtbc, should it for tomorrow? Would you like to wait on changes from @bpindelski? |
@joshmoore I think all the changes @mtbc needs are in #897. That will allow for removing the dependancy on |
Yeah, remove it today and I'll push another commit later that is based on #897 so that the revised version gets built tomorrow morning. |
Should there be a new exception class for checksum mismatches that has the client and server checksums and file path as properties? (Extending which class?) Or is what's here good enough for now? |
@mtbc On |
Further commit will be tomorrow, not today. (I'm not even going to get finished with permissions testing today.) |
Okay, should be ready for testing again. |
Unlabeled. |
One further location that could use your inspection: (in fact, any location that calls |
I think the |
Basic archived import's certainly still work fine:
Though I'm still pondering who to make the checksum check fail. |
If it doesn't unduly invalidate the review, when the server or client hasher is constructed, put an extra byte into it so it'll screw up. (-: |
|
@mtbc: this PR all looks healthy and happy even if there are various things outside of the PR which are less so. Let me know if you would like to handle those in a separate PR or here. |
I'd like to fix |
|
Faked a failure. 👍
|
We'll likely need to decide on the usability of this at some point, since this leaves garbage on the server that the user may want to delete immediately. /cc @jburel @gusferguson |
True, though they may also want it left around for a while first so the sysadmin can investigate the corruption. |
Will require some form of notification - so an option in that to delete or retain? |
if we have a checksum mismatch, I was planning to add a delete control. I used to have code that will automatically delete the image if an error occurred.
|
This seems to work for me, too. The rest of the resource leakage cleanup I'll leave for https://trac.openmicroscopy.org.uk/ome/ticket/10565 |
@jburel: do you have that ticketed elsewhere? |
No I did not have the time to do it. I will do that today |
ticket created: https://trac.openmicroscopy.org.uk/ome/ticket/10580 |
Thanks all. |
Increase checksum noting and matching for imports.
To test make sure that different import/upload paths still work, including archiving during import. For real files in the server's local filesystem, if they have a corresponding entry in the
originalfile
table in the DB then make sure that the SHA1 there is set correctly.Makes progress on http://trac.openmicroscopy.org.uk/ome/ticket/2581