Repository navigation
Background cleanup job for system and user tag orphaned when file was deleted - #21990
Merged
Merged
Conversation
|
By analyzing the blame information on this pull request, we identified @LukasReschke, @nickvergessen and @MorrisJobke to be potential reviewers |
Contributor
Author
|
Oh, looks like we had a repair step that did something similar for user tags: #13344 Maybe we should remove the repair step too ? |
Contributor
There was a problem hiding this comment.
Once a day should be enough?
Contributor
Author
@nickvergessen what do you think ? From what I saw you wrote it 😄 |
nickvergessen
force-pushed
the
systemtags-cleanup-orphans
branch
2 times, most recently
from
January 29, 2016 10:49
ae488b6 to
75dd8a0
Compare
Contributor
Still works, 👍 for the actual code (which I didn't touch apart from the splitting) |
Whenever a file was deleted (also from trash), the tag mapping is pointing at a fileid that doesn't exist any more. This cleanup job will delete such orphaned mapping entries.
nickvergessen
force-pushed
the
systemtags-cleanup-orphans
branch
from
January 29, 2016 10:51
75dd8a0 to
f0caf41
Compare
Contributor
|
Tested and works 👍 |
DeepDiver1975
added a commit
that referenced
this pull request
Jan 29, 2016
Background cleanup job for system and user tag orphaned when file was deleted
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Whenever a file was deleted (also from trash), the tag mapping is
pointing at a fileid that doesn't exist any more.
This cleanup job will delete such orphaned mapping entries.
This applies for BOTH system tags and user tags (like favorite).
To test:
select * from oc_vcategory_to_object where objid=$fileid=> 1 resultselect * from oc_systemtag_object_mapping where objectid=$fileid=> 1 resultupdate oc_jobs set last_run=0 where class='OCA\\Files\\Lib\\DeleteOrphanedTagsJob'Please review @nickvergessen @icewind1991 @rullzer @blizzz