Skip to content

Commit

Permalink
enable transational locking by default
Browse files Browse the repository at this point in the history
  • Loading branch information
icewind1991 committed Sep 2, 2015
1 parent f973597 commit 4880d77
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/private/server.php
Original file line number Diff line number Diff line change
Expand Up @@ -451,13 +451,13 @@ public function __construct($webRoot) {
);
});
$this->registerService('LockingProvider', function (Server $c) {
if ($c->getConfig()->getSystemValue('filelocking.enabled', false) or (defined('PHPUNIT_RUN') && PHPUNIT_RUN)) {
if ($c->getConfig()->getSystemValue('filelocking.enabled', true) or (defined('PHPUNIT_RUN') && PHPUNIT_RUN)) {
/** @var \OC\Memcache\Factory $memcacheFactory */
$memcacheFactory = $c->getMemCacheFactory();
$memcache = $memcacheFactory->createLocking('lock');
// if (!($memcache instanceof \OC\Memcache\NullCache)) {
// return new MemcacheLockingProvider($memcache);
// }
if (!($memcache instanceof \OC\Memcache\NullCache)) {
return new MemcacheLockingProvider($memcache);
}
return new DBLockingProvider($c->getDatabaseConnection(), $c->getLogger());
}
return new NoopLockingProvider();
Expand Down

0 comments on commit 4880d77

Please sign in to comment.