-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Properly reset the checksum if the file data has changed #32248
Conversation
@jvillafanez would be good to add a unit test at first look I have a hard time to understand what you actually changed, might explain the difference before vs after ? |
The code is fundamentally the same: if the size, storage_mtime, mtime or etag has changed, then reset the checksum. The new code is better because the old one used The problem was that the |
@jvillafanez will this change have other side effects ? would be good to check and extend the unit tests to confirm this works correctly |
Codecov Report
@@ Coverage Diff @@
## master #32248 +/- ##
============================================
+ Coverage 64.01% 64.02% +<.01%
- Complexity 18559 18560 +1
============================================
Files 1171 1171
Lines 69834 69836 +2
Branches 1267 1267
============================================
+ Hits 44706 44710 +4
+ Misses 24758 24756 -2
Partials 370 370
Continue to review full report at Codecov.
|
There are still some unittests failing, but I'm not sure where the problem is. Updated code still works and makes sense, so there shouldn't be a problem with the changes but the checksum repair tests are failing. I'm not sure if there are some problems with the tests. |
@jvillafanez Try breaking the checksum intentionally and then repairing it via repair command to see if checksum repair works as expected. If this is the case we can debug the test to see what is going wrong |
I've modifed the data in the DB and it seems the command works. If the checksum has been reset:
If not:
|
ce76d57
to
1587e6c
Compare
I assume this requires backport .... |
looks like no needed - @jvillafanez please clarify - thx |
@DeepDiver1975 Also - might not be solved - still waiting for customer feedback |
upon cherry-pick I get an empty commit ... so I assume this was merged with some other pr already ... this is why I was asking for clarification. |
Backport was #32284 (already merged) |
how to test this manually, is there a shortcut ? Steps I tried:
Result: the mtime of the file changed in the web UI On both v10.0.9 and v10.0.10RC1 the checksum gets cleared properly. Are there any more subtle things to setup ? @jvillafanez |
Other than the steps in the original ticket I'm not sure if this can be easily reproduced. I think the key point is to have the same checksum with different etag and size over the same file in different moments. |
Description
Properly reset the checksum if the file has changed
Related Issue
Motivation and Context
Checksum wasn't being reset in that scenario. The previous condition was wrong
How Has This Been Tested?
Manually tested with the scenario described in the issue
Screenshots (if appropriate):
Types of changes
Checklist:
Open tasks: