-
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
Fix size propagation over shared storage boundary #14720
Conversation
@icewind1991 I wonder if at some point we should move size calculation to the propagator classes |
It turns out size propagation is easy but etag/mtime propagation is hard. The "Updater" class is based on the current user's view, so it's not possible to make it work on another user's view without setupFS gymnastics... I also tried to instantiate a ChangePropagator from the SharedScanner, but that's another code path and isn't triggered. @icewind1991 any suggestion how to make this work ? |
Keep in mind that the fix needs to be backportable to OC 7... |
Let's keep this here only for the size propagation. |
@PVince81 , I just tested and it works for me :-) |
Great to hear that, thanks for testing. I still need to write a unit test to finish this PR. |
...that assuming that @icewind1991 is fine with the approach I used. |
Just had a go at a unit test locally and the bad news is that it seems to propagate wrong. Whenever a share recipient changes a file, the size should be propagated to the owner's root, NOT to the recipient's root. The propagation must stop at the shared folder and not go further. It doesn't seem to be the case at the moment. This means that the size would be counted twice, once for each user, which is wrong. |
Hmmm, I tried this manually and the propagation seems to work properly. The recipient's root size stays the same. Maybe something is wrong in the unit test then. |
19512ed
to
ec19d9c
Compare
A new inspection was created. |
Ok fixed the unit test. |
Test steps are here: #14596 (comment) |
Refer to this link for build results (access rights to CI server needed): |
Please review @icewind1991 @DeepDiver1975 @MorrisJobke @nickvergessen @schiesbn The patch was tested by the original reporter here #14720 (comment) |
Looks good 👍 |
Tested & works:+1: |
Fix size propagation over shared storage boundary
@karlitschek backport to OC 7 and OC 8 ? (for 7.0.7 and 8.0.3) |
Please backport once 8.0.2 and 7.0.5 are done :-) 👍 |
Preparing backport PRs now. |
Fix size propagation for #14596
@icewind1991 FYI