From 4fdd38c7378415c552859dc4c0d2dda709f699ec Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Thu, 6 Aug 2020 14:00:51 +0200 Subject: [PATCH] Use fixed preview buckets that are postfixed with -preview-NUMBER Signed-off-by: Morris Jobke --- .../Files/Mount/ObjectStorePreviewCacheMountProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/private/Files/Mount/ObjectStorePreviewCacheMountProvider.php b/lib/private/Files/Mount/ObjectStorePreviewCacheMountProvider.php index 9ab0327684..dba1dfc28e 100644 --- a/lib/private/Files/Mount/ObjectStorePreviewCacheMountProvider.php +++ b/lib/private/Files/Mount/ObjectStorePreviewCacheMountProvider.php @@ -108,8 +108,8 @@ class ObjectStorePreviewCacheMountProvider implements IRootMountProvider { if (!isset($config['arguments']['bucket'])) { $config['arguments']['bucket'] = ''; } - $numBuckets = isset($config['arguments']['num_buckets']) ? $config['arguments']['num_buckets'] : 64; - $config['arguments']['bucket'] .= (string)($number % $numBuckets); + + $config['arguments']['bucket'] .= "-preview-$number"; // instantiate object store implementation $config['arguments']['objectstore'] = new $config['class']($config['arguments']);