add command do delete orphan shares#39170
Merged
icewind1991 merged 1 commit intomasterfrom Jul 10, 2023
Merged
Conversation
3ac1cc7 to
4c31c31
Compare
1 task
4c31c31 to
b567ec5
Compare
b567ec5 to
baa60cd
Compare
Signed-off-by: Robin Appelman <[email protected]>
baa60cd to
50501f8
Compare
Member
|
/backport to stable27 |
Member
|
/backport to stable26 |
come-nc
approved these changes
Jul 6, 2023
artonge
reviewed
Jul 6, 2023
Contributor
artonge
left a comment
There was a problem hiding this comment.
- Does it really scale to fetch all share and then to set up the file system for each owner? Or does the
yieldstatement makes it more manageable? Not familiar with it. - Do we have a logic in place to prevent those from happening?
| } | ||
|
|
||
| if ($doDelete) { | ||
| $this->orphanHelper->deleteShares($orphans); |
Contributor
There was a problem hiding this comment.
No option to delete them one by one? Maybe it is irrelevant in the use case.
Member
Author
It will be slow yes, but there isn't really to much that can be done for that |
Member
|
If it only makes the command slow then I'd say that is fine or would it also impact "online" transactions? 👍 |
AndyScherzinger
approved these changes
Jul 10, 2023
Member
Author
|
Performance impact is only for the command |
|
The backport to stable26 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable26
git pull origin stable26
# Create the new backport branch
git checkout -b fix/foo-stable26
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable26 |
Member
|
The new occ command needs admin docs |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Compared to the existing background job, this command validates that the share owner still has access to the file instead of just checking that the file still exists.
I've decided against not adding this to the background command as the "owner lost access" case is recoverable by having the owner regain access. So automatically deleting them might be undesired.
Steps to create an orphaned share:
A,BandC. Create a groupfolderGand giveAandBaccess to it.Buploads a fileFtoGand shares it withCAmovesFoutsideGCnow has an orphaned share asBno longer has access toF