Repository navigation
Delete orphaned shares in a background job - #14676
Conversation
There was a problem hiding this comment.
I know, I need to get my hands dirty again here 😄
|
Fixes #6985 |
ab5e634 to
7d9b937
Compare
|
@MorrisJobke check this out, you asked about the SQL query to delete orphaned shares |
|
7d9b937 to
f1074fe
Compare
f1074fe to
8e25d90
Compare
|
Added unit test and special case for SQLite. |
|
|
After discussing with @MorrisJobke we decided to go the sub-query approach which works for all DBs (note that the current approach also fails on PostgreSQL). I'll make the change. |
|
|
Retested with a shared address book. I can confirm that only the orphaned folder share was deleted. |
8b02313 to
7fb7774
Compare
|
Squashed and jenkins PR update pushed :) |
|
Individual test pass locally but not on Jenkins, possibly a side-effect of other tests: I'll see what I can do. |
7fb7774 to
17b1413
Compare
|
Rebased onto master |
|
Jenkins PR: #15457 |
|
Still the same: |
|
The test doesn't work any more because somehow the trashbin appears and moves the files to trash instead of a full deletion. For some reason it didn't many commits ago. I'll try and find a solution. |
|
@PVince81 related to storage wrapping? |
|
A new inspection was created. |
|
Jenkins PR: #15466 |
|
@nickvergessen yes, but the wrapping is normal here (not a bug). |
|
Refer to this link for build results (access rights to CI server needed): |
|
Tests passed, please review @MorrisJobke @DeepDiver1975 @LukasReschke @nickvergessen |
|
Tested and works 👍 |
|
maybe @rullzer or @Xenopathic want to review this? ;) |
|
@LukasReschke @nickvergessen @DeepDiver1975 Reviewers needed :) |
|
👍 |
Delete orphaned shares in a background job

Partial fix for #12323
Fixes #14664
integrate with CleanTags to avoid code duplication: https://github.com/owncloud/core/blob/master/lib/repair/cleantags.phpmaybe later...Even though this solves the issue in a "brutal" manner by simply deleting ALL orphaned shares it feels hacky.
I could add code to find all child elements but that would take more time.
@DeepDiver1975 @icewind1991