mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
fix: hint storage id in more places
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
4d9b563d22
commit
390f6a78b4
1 changed files with 5 additions and 2 deletions
|
|
@ -371,6 +371,7 @@ class Cache implements ICache {
|
|||
$query = $this->getQueryBuilder();
|
||||
$query->update('filecache_extended')
|
||||
->whereFileId($id)
|
||||
->hintShardKey('storage', $this->getNumericStorageId())
|
||||
->andWhere($query->expr()->orX(...array_map(function ($key, $value) use ($query) {
|
||||
return $query->expr()->orX(
|
||||
$query->expr()->neq($key, $query->createNamedParameter($value)),
|
||||
|
|
@ -523,7 +524,8 @@ class Cache implements ICache {
|
|||
|
||||
$query = $this->getQueryBuilder();
|
||||
$query->delete('filecache_extended')
|
||||
->whereFileId($entry->getId());
|
||||
->whereFileId($entry->getId())
|
||||
->hintShardKey('storage', $this->getNumericStorageId());
|
||||
$query->execute();
|
||||
|
||||
if ($entry->getMimeType() == FileInfo::MIMETYPE_FOLDER) {
|
||||
|
|
@ -567,7 +569,8 @@ class Cache implements ICache {
|
|||
|
||||
$query = $this->getQueryBuilder();
|
||||
$query->delete('filecache_extended')
|
||||
->where($query->expr()->in('fileid', $query->createParameter('childIds')));
|
||||
->where($query->expr()->in('fileid', $query->createParameter('childIds')))
|
||||
->hintShardKey('storage', $this->getNumericStorageId());
|
||||
|
||||
foreach (array_chunk($childIds, 1000) as $childIdChunk) {
|
||||
$query->setParameter('childIds', $childIdChunk, IQueryBuilder::PARAM_INT_ARRAY);
|
||||
|
|
|
|||
Loading…
Reference in a new issue