aboutsummaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2016-05-30 12:09:42 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2016-05-30 12:31:33 +0200
commit4da5a741927e512464358f1d717019389e350e66 (patch)
treef96f2c66361c2da14c14134a81f290df618dc55a /settings
parent12b482b976656bb73b1dd265b3e069ff4eb71c65 (diff)
downloadnextcloud-server-4da5a741927e512464358f1d717019389e350e66.tar.gz
nextcloud-server-4da5a741927e512464358f1d717019389e350e66.zip
Add a warning when the transaction isolation level is not READ_COMMITED
Diffstat (limited to 'settings')
-rw-r--r--settings/admin.php13
-rw-r--r--settings/templates/admin.php9
2 files changed, 22 insertions, 0 deletions
diff --git a/settings/admin.php b/settings/admin.php
index 5bddd4bc5e5..6fb65b013e6 100644
--- a/settings/admin.php
+++ b/settings/admin.php
@@ -103,6 +103,19 @@ $externalBackends = (count($backends) > 1) ? true : false;
$template->assign('encryptionReady', \OC::$server->getEncryptionManager()->isReady());
$template->assign('externalBackendsEnabled', $externalBackends);
+/** @var \Doctrine\DBAL\Connection $connection */
+$connection = \OC::$server->getDatabaseConnection();
+try {
+ if ($connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\SqlitePlatform) {
+ $template->assign('invalidTransactionIsolationLevel', false);
+ } else {
+ $template->assign('invalidTransactionIsolationLevel', $connection->getTransactionIsolation() !== \Doctrine\DBAL\Connection::TRANSACTION_READ_COMMITTED);
+ }
+} catch (\Doctrine\DBAL\DBALException $e) {
+ // ignore
+ $template->assign('invalidTransactionIsolationLevel', false);
+}
+
$encryptionModules = \OC::$server->getEncryptionManager()->getEncryptionModules();
$defaultEncryptionModuleId = \OC::$server->getEncryptionManager()->getDefaultEncryptionModuleId();
diff --git a/settings/templates/admin.php b/settings/templates/admin.php
index 6cf4b43c162..0cdefe10083 100644
--- a/settings/templates/admin.php
+++ b/settings/templates/admin.php
@@ -97,6 +97,15 @@ if (!$_['isAnnotationsWorking']) {
<?php
}
+// Is the Transaction isolation level READ_COMMITED?
+if ($_['invalidTransactionIsolationLevel']) {
+ ?>
+ <li>
+ <?php p($l->t('Your database does not run with "READ COMMITED" transaction isolation level. This can cause problems when multiple actions are executed in parallel.')); ?>
+ </li>
+<?php
+}
+
// Windows Warning
if ($_['WindowsWarning']) {
?>