aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/server.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-08-26 03:56:37 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-08-26 03:56:37 +0200
commit534b2e407a80405c636b1ebd4486d01b9d3147bd (patch)
tree540fc589d148d8962b057b4914fbc59539251414 /lib/private/server.php
parentb45ae1b32e41951a879bdbbdbbe0cb04dd86cda1 (diff)
parent6f6a5f6c2981cd046abc0530c4b6a222e67f17a7 (diff)
downloadnextcloud-server-534b2e407a80405c636b1ebd4486d01b9d3147bd.tar.gz
nextcloud-server-534b2e407a80405c636b1ebd4486d01b9d3147bd.zip
Merge pull request #17662 from owncloud/locking-db
Database backend for locking
Diffstat (limited to 'lib/private/server.php')
-rw-r--r--lib/private/server.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/private/server.php b/lib/private/server.php
index 5a3a6328fae..287b70eb806 100644
--- a/lib/private/server.php
+++ b/lib/private/server.php
@@ -49,6 +49,7 @@ use OC\Diagnostics\QueryLogger;
use OC\Files\Node\Root;
use OC\Files\View;
use OC\Http\Client\ClientService;
+use OC\Lock\DBLockingProvider;
use OC\Lock\MemcacheLockingProvider;
use OC\Lock\NoopLockingProvider;
use OC\Mail\Mailer;
@@ -441,13 +442,10 @@ class Server extends SimpleContainer implements IServerContainer {
/** @var \OC\Memcache\Factory $memcacheFactory */
$memcacheFactory = $c->getMemCacheFactory();
$memcache = $memcacheFactory->createLocking('lock');
- if (!($memcache instanceof \OC\Memcache\NullCache)) {
- return new MemcacheLockingProvider($memcache);
- }
- throw new HintException(
- 'File locking is enabled but the locking cache class was not found',
- 'Please check the "memcache.locking" setting and make sure the matching PHP module is installed and enabled'
- );
+// if (!($memcache instanceof \OC\Memcache\NullCache)) {
+// return new MemcacheLockingProvider($memcache);
+// }
+ return new DBLockingProvider($c->getDatabaseConnection(), $c->getLogger());
}
return new NoopLockingProvider();
});