Skip to content
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

Stale oc_properties values in the wild #34734

Open
tomneedham opened this issue Mar 11, 2019 · 6 comments
Open

Stale oc_properties values in the wild #34734

tomneedham opened this issue Mar 11, 2019 · 6 comments
Labels

Comments

@tomneedham
Copy link
Contributor

ownCloud 10.x - Server

Sometimes apps / plugins etc add properties into oc_properties - which relate to a fileid on the oc_filecache table. There is no foreign key with cascading delete - so deleted in the filecache can cause stale entries in the oc_properties table. Individual plugins are then resposible for implementing a OCP\Files\NotFoundExcepetion check which doesn't always happen / insn't in place yet.

You can spot stale entries with thie query:

SELECT * FROM oc_properties p WHERE NOT EXISTS (SELECT null FROM oc_filecache f WHERE f.fileid = p.fileid)

Maybe we should run this on a few instnaces to see what propertyname values we have?

I've seen at least upload-time which was left of over holding_period. And {http://owncloud.org/ns}role with a null fileid ?!

We could cleanup this in a maintenance step, or get individual use cases to cleanup their entries in repair steps?

@tomneedham
Copy link
Contributor Author

Related to #13143

@PVince81
Copy link
Contributor

isn't this solved with #33413 that was released with 10.1.0 ?

@PVince81
Copy link
Contributor

foreign keys would be nice though... we started adding some for the oc_persistent_locks properties

@tomneedham
Copy link
Contributor Author

isn't this solved with #33413 that was released with 10.1.0 ?

Yes - but existing stale values. Maintennace step to cleanup would be nice.

Where does {http://owncloud.org/ns}role come from, why does it have a NULL fileid, and present multiple times?

@DeepDiver1975
Copy link
Member

as designed - bad designed - but as designed

solution: build a occ command for clean up

@PVince81
Copy link
Contributor

or have an occ command to run the bkg job right away..

sometimes it feels like we'd need to factorize "background job", "repair step" and "occ command" into a single concept. then each can be run either periodically, on CLI or on upgrade... this way we don't reimplement as occ something that already exists as background job.

also note this PR to run bkg job directly: #31617

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants