-
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 cleanup of orphaned properties #35407
Conversation
ba9ba13
to
66aadeb
Compare
Codecov Report
@@ Coverage Diff @@
## master #35407 +/- ##
=============================================
- Coverage 65.68% 31.5% -34.19%
=============================================
Files 1221 48 -1173
Lines 70793 3282 -67511
Branches 1288 0 -1288
=============================================
- Hits 46503 1034 -45469
+ Misses 23913 2248 -21665
+ Partials 377 0 -377
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #35407 +/- ##
============================================
- Coverage 66.43% 65.81% -0.62%
+ Complexity 20183 18818 -1365
============================================
Files 1233 1228 -5
Lines 68965 70982 +2017
Branches 0 1289 +1289
============================================
+ Hits 45814 46716 +902
- Misses 23151 23888 +737
- Partials 0 378 +378
Continue to review full report at Codecov.
|
@skazi0 What do you want to achieve? We try to remove properties where no files exist in the filecache. |
@micbar I want to fix the looping problem (see linked issue). Probably my change breaks the functionality of this "orphan cleaner" feature while fixing the problem. I blindly assumed that while the code and comment don't match, the comment is the right version. |
66aadeb
to
e5d758a
Compare
As discussed in #35777 the master branch will from now on hold the ownCloud 10 codebase. This PR targetted ownCloud 11 which is postponed to a far distant future. Because of that I'm closing this PR and kindly ask you to re-submit this PR in a few days. Thanks a lot for your patience |
@skazi0 can you recreate this please? |
It was not working correctly when some property already had NULL fileid. In such cases, `fileid` was cast to 0 and then used in a `... WHERE fileid in (0)` query which was not matching NULLs as expected. Example of such property is `{http://owncloud.org/ns}calendar-enabled`.
e5d758a
to
e684cc0
Compare
@phil-davis @DeepDiver1975 yeah, I struggled a bit with rebasing but cherry-pick on top of "new" master seems to be correct. |
If the |
@sharidas This is what I have in my
I don't know what these are for and how they work without |
@skazi0 I appreciate your feedback. Now I wonder if the fileid points to NULL, which means there is no file which is present in the cache. This also means, we would need to clean them up. Looking into the same. |
@skazi0 I would need your helping hand here in reproducing this issue. May I know if you have used curl or any other client to populate the table? If so, could you help us know roughly what is the data provided so that I can reproduce this issue. Thanks. |
@sharidas Sorry for late response but I was offline for a week. I have not done any manual changes or API calls to get to this problematic state. As #35292 was reported by another user, we are sure that I'm not the only one having this issue. My installation is quite old (my oldest backups are from 2015) and the oldest db snapshot I found with those entries is from 2017-07-01. I didn't have time for a deeper look into the calendar app so I have no idea if these are some old entries or if this is still reproducible with current version. |
@sharidas have you found the root cause of these entries? |
@skazi0 Unfortunately I couldn't reproduce the issue. All I could confirm is that there was an issue in the table which was allowing null entries for fileid. For whatever reason, that shouldn't happen. My PR addresses the issue in the table. So after applying this change, no longer null entries would creep into the column fileid in the table. |
closed in favor of #36084 |
Description
It was not working correctly when some property already had NULL fileid.
In such cases,
fileid
was cast to 0 and then used in a... WHERE fileid in (0)
query which was not matching NULLs as expected.
Example of such property is
{http://owncloud.org/ns}calendar-enabled
.Related Issue
Motivation and Context
Fix for hanging cron.php
How Has This Been Tested?
Tested on a live installation.
Screenshots (if appropriate):
n/a
Types of changes
Checklist:
Open tasks: