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

Fix cleanup of orphaned properties #35407

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/dav/lib/BackgroundJob/CleanProperties.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ private function processProperties() {
/**
* select prop.fileid from oc_properties prop
* left join oc_filecache fc on fc.fileid = prop.fileid
* where fc.fileid is not null limit 200
* where prop.fileid is not null and fc.fileid is null limit 200
*/
$qb->select('prop.fileid')
->from('properties', 'prop')
->where($qb->expr()->isNull('fc.fileid'))
->where($qb->expr()->andX($qb->expr()->isNotNull('prop.fileid'), $qb->expr()->isNull('fc.fileid')))
->leftJoin('prop', 'filecache', 'fc', $qb->expr()->eq('prop.fileid', 'fc.fileid'))
->setMaxResults(self::CHUNK_SIZE);

Expand Down