Add a warning when the transaction isolation level is not READ_COMMITED
This commit is contained in:
parent
12b482b976
commit
4da5a74192
|
@ -103,6 +103,19 @@ $externalBackends = (count($backends) > 1) ? true : false;
|
||||||
$template->assign('encryptionReady', \OC::$server->getEncryptionManager()->isReady());
|
$template->assign('encryptionReady', \OC::$server->getEncryptionManager()->isReady());
|
||||||
$template->assign('externalBackendsEnabled', $externalBackends);
|
$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();
|
$encryptionModules = \OC::$server->getEncryptionManager()->getEncryptionModules();
|
||||||
$defaultEncryptionModuleId = \OC::$server->getEncryptionManager()->getDefaultEncryptionModuleId();
|
$defaultEncryptionModuleId = \OC::$server->getEncryptionManager()->getDefaultEncryptionModuleId();
|
||||||
|
|
||||||
|
|
|
@ -97,6 +97,15 @@ if (!$_['isAnnotationsWorking']) {
|
||||||
<?php
|
<?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
|
// Windows Warning
|
||||||
if ($_['WindowsWarning']) {
|
if ($_['WindowsWarning']) {
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue