Use fixed preview buckets that are postfixed with -preview-NUMBER

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2020-08-06 14:00:51 +02:00
parent 159f28cd52
commit 4fdd38c737
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
1 changed files with 2 additions and 2 deletions

View File

@ -108,8 +108,8 @@ class ObjectStorePreviewCacheMountProvider implements IRootMountProvider {
if (!isset($config['arguments']['bucket'])) { if (!isset($config['arguments']['bucket'])) {
$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 // instantiate object store implementation
$config['arguments']['objectstore'] = new $config['class']($config['arguments']); $config['arguments']['objectstore'] = new $config['class']($config['arguments']);