diff options
author | Robin Appelman <robin@icewind.nl> | 2024-07-31 17:17:54 +0200 |
---|---|---|
committer | Louis <louis@chmn.me> | 2024-08-28 14:54:14 +0200 |
commit | ddecae894a456a61dd15886acdf4a90c4d477e96 (patch) | |
tree | f3236bc9433eed8fa447b2d9ce54667f85777693 | |
parent | 550072342b44f77140d661276d1eaa8e4de0de7c (diff) | |
download | nextcloud-server-ddecae894a456a61dd15886acdf4a90c4d477e96.tar.gz nextcloud-server-ddecae894a456a61dd15886acdf4a90c4d477e96.zip |
fix: adjust systemtag orphan cleanup query to work with sharding
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r-- | apps/files/lib/BackgroundJob/DeleteOrphanedItems.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files/lib/BackgroundJob/DeleteOrphanedItems.php b/apps/files/lib/BackgroundJob/DeleteOrphanedItems.php index 0d6a632db1a..32fb569a3d4 100644 --- a/apps/files/lib/BackgroundJob/DeleteOrphanedItems.php +++ b/apps/files/lib/BackgroundJob/DeleteOrphanedItems.php @@ -59,8 +59,8 @@ class DeleteOrphanedItems extends TimedJob { $query->select('t1.' . $idCol) ->from($table, 't1') ->where($query->expr()->eq($typeCol, $query->expr()->literal('files'))) - ->andWhere($query->expr()->isNull('t2.fileid')) ->leftJoin('t1', 'filecache', 't2', $query->expr()->eq($query->expr()->castColumn('t1.' . $idCol, IQueryBuilder::PARAM_INT), 't2.fileid')) + ->andWhere($query->expr()->isNull('t2.fileid')) ->groupBy('t1.' . $idCol) ->setMaxResults(self::CHUNK_SIZE); |