Add a warning when the transaction isolation level is not READ_COMMITED #24889

Merged
merged 1 commit into from May 31, 2016

Projects

None yet

6 participants

@nickvergessen nickvergessen added this to the 9.1-current milestone May 30, 2016
@mention-bot

By analyzing the blame information on this pull request, we identified @DeepDiver1975, @LukasReschke and @jancborchardt to be potential reviewers

@DeepDiver1975 DeepDiver1975 and 1 other commented on an outdated diff May 30, 2016
settings/admin.php
@@ -103,6 +103,15 @@
$template->assign('encryptionReady', \OC::$server->getEncryptionManager()->isReady());
$template->assign('externalBackendsEnabled', $externalBackends);
+/** @var \Doctrine\DBAL\Connection $connection */
+$connection = \OC::$server->getDatabaseConnection();
+try {
+ $template->assign('invalidTransactionIsolationLevel', $connection->getTransactionIsolation() !== \Doctrine\DBAL\Connection::TRANSACTION_READ_COMMITTED);
@DeepDiver1975
DeepDiver1975 May 30, 2016 Member

Is this required for all dbms or only mysql?

@nickvergessen
nickvergessen May 30, 2016 Contributor

It is required for all that have a transaction isolation level:
Postgres: https://www.postgresql.org/docs/current/static/transaction-iso.html
Oracle: http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_10005.htm#SQLRF01705

Can't find exact docs for sqlite, it seems to have a boolean for "read uncommited" instead.
So I guess I will disable it for sqlite

@DeepDiver1975
Member

We should backport this to all stable releases

@nickvergessen nickvergessen Add a warning when the transaction isolation level is not READ_COMMITED
4da5a74
@DeepDiver1975
Member

👍

@rullzer
Contributor
rullzer commented May 30, 2016

👍

@PVince81 PVince81 merged commit ba62262 into master May 31, 2016

18 checks passed

Scrutinizer 2 new issues
Details
cla-bot-core Build #4483 succeeded in 3 min 47 sec
Details
continuous-integration/php-5.4 Build #4339 succeeded in 16 min
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
core-ci-linux-swift-primary-storage/database=mysql,label=SLAVE Build #56787 succeeded in 23 min
Details
core-ci-linux/database=mysql,label=SLAVE Build #31236 succeeded in 25 min
Details
core-ci-linux/database=oci,label=SLAVE Build #31236 succeeded in 35 min
Details
core-ci-linux/database=pgsql,label=SLAVE Build #31236 succeeded in 23 min
Details
core-ci-linux/database=sqlite,label=SLAVE Build #31236 succeeded in 13 min
Details
ocs-api-integration-tests-ci Build #11175 succeeded in 18 min
Details
server-master-linux-php7-ci/database=sqlite,label=SLAVE Build #39604 succeeded in 12 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=litmus,mirallBranch=v2.0.2,slave=SMASH Build #15080 succeeded in 21 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_basicSync@0,mirallBranch=v2.0.2,slave=SMASH Build #15080 succeeded in 24 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_basicSync@1,mirallBranch=v2.0.2,slave=SMASH Build #15080 succeeded in 27 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_shareLink,mirallBranch=v2.0.2,slave=SMASH Build #15080 succeeded in 1 hr 8 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_sharePermissions,mirallBranch=v2.0.2,slave=SMASH Build #15080 succeeded in 56 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_sharePropagationGroups,mirallBranch=v2.0.2,slave=SMASH Build #15080 succeeded in 32 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_sharePropagationInsideGroups,mirallBranch=v2.0.2,slave=SMASH Build #15080 succeeded in 1 hr 12 min
Details
@PVince81 PVince81 deleted the add-warning-wrong-transaction-isolation-level branch May 31, 2016
@PVince81
Collaborator

@nickvergessen please submit the backport PRs, thanks

CC @cmonteroluque @DeepDiver1975

@nickvergessen
Contributor

9.0: #24915
8.2: #24916
8.1: #24917
8.0: #24918

@cmonteroluque
Contributor
@ghost Unknown referenced this pull request in owncloud/documentation Jun 8, 2016
Closed

Add a warning when the transaction isolation level is not READ_COMMITED #2477

@ghost
ghost commented Jun 8, 2016

Ref to the doc part: owncloud/documentation#2477

There definitely will be questions about that coming up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment