-
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
Lost share when transferring files to recipient #31150
Comments
GitMate.io thinks possibly related issues are #13671 (Versions lost when moving file into shared folder as recipient), #22594 (Meta data lost when recipient restores a file), #13307 (Move shared file into shared folder as recipient, moved share info lost), #16225 (Files_texteditor gets frozen when a user tries to open a shared file as recipient which was deleted), and #15468 (Files stop being shared after a recipient restores them to previous versions). |
setting to p2 as data loss is bad |
talked with @felixboehm and we're going to revert the original fix as the effect is less critical then move ticket to 10.0.9 for a proper full fix |
Revert PR is here for stable10: #31164 |
The revert doesn't solve the issue. @sharidas will try to find a solution. I expect it to be non-intrusive and should not affect QA testing efforts. If a solution is found in time we can consider putting it in RC3 if a RC3 is deemed necessary. @pmaier1 @felixboehm FYI |
Investigated with @sharidas: the public link has a "parent" field pointing to the regular share. @sharidas is investigating if there is a good way to deparent the reshare so it can continue to exist, with a solution within the boundaries of the current sharing API. |
the parent relationship is not exposed over API Another idea is to add a new method |
to be rescheduled |
I misunderstood, this was close to completion and just got finished. Closing |
In the above scenario, the deletion of share at https://github.com/owncloud/core/blob/stable10/lib/private/Share20/Manager.php#L730. I was having a thought of processing public links first. But this code path suggests that it doesn't give any upper edge if we process public links first and the remaining shares at the last. |
Manual testing of scenario #31150 (comment) still fails when the git HEAD is pointed to commit ( git reset ) representing this pr #31176 |
Would it be a bad solution if the If the exclude list is empty the behaviour of |
Not sure if it would be a good idea, because it means you'd have orphaned entries in the DB where the "parent" value points nowhere. If we had foreign key contraints it would be stricly forbidden by the DB. How about gathering the list of children before doing any deletion ? Then transfer the children. Once the transfer is done, proceed with deletion. |
the latter would require two iteration over the user's share but I don't expect a single user to have 10000+ shares so it should be ok |
Yes the orphaned entries in the DB was pulling me back from this idea.
didn't quite get by 'transfer the children' |
Ok so if I understood correctly for 'transfer the children' -> Create new share from the child share. And then proceed with the deletion. |
or just update the child share to not have a parent value any more ? whatever you already did in the current code, but do it earlier ? |
Created a WIP PR -> #31924. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Steps
occ files:transfer-ownership user1 user2
Expected result
Link share preserved
Actual result
Link share completely lost, even removed from oc_share table.
Version
10.0.8 RC1
Discovered while testing #30161
The text was updated successfully, but these errors were encountered: