Merge lp:~jtv/maas/1.5-isolation into lp:maas/1.5

Proposed by Jeroen T. Vermeulen
Status: Merged
Approved by: Jeroen T. Vermeulen
Approved revision: no longer in the source branch.
Merged at revision: 2266
Proposed branch: lp:~jtv/maas/1.5-isolation
Merge into: lp:maas/1.5
Diff against target: 47 lines (+10/-2)
2 files modified
src/maas/development.py (+5/-1)
src/maas/settings.py (+5/-1)
To merge this branch: bzr merge lp:~jtv/maas/1.5-isolation
Reviewer Review Type Date Requested Status
Jeroen T. Vermeulen (community) Approve
Review via email: mp+218714@code.launchpad.net

This proposal supersedes a proposal from 2014-05-07.

Commit message

Backport trunk r2306: Raise isolation level from the default Read Committed to Serializable. Django 1.6 added support. In situations where previously you'd get potentially incorrect updates, you will now get an OperationalError.

Description of the change

Trivial backport. Will self-approve.

Jeroen

To post a comment you must log in.
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Self-approving.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/maas/development.py'
2--- src/maas/development.py 2014-01-09 12:50:53 +0000
3+++ src/maas/development.py 2014-05-07 22:26:56 +0000
4@@ -24,6 +24,7 @@
5 )
6 from metadataserver.address import guess_server_address
7 import provisioningserver.config
8+from psycopg2.extensions import ISOLATION_LEVEL_SERIALIZABLE
9
10 # We expect the following settings to be overridden. They are mentioned here
11 # to silence lint warnings.
12@@ -68,7 +69,10 @@
13 # For PostgreSQL, a "hostname" starting with a slash indicates a
14 # Unix socket directory.
15 'HOST': abspath('db'),
16- }
17+ 'OPTIONS': {
18+ 'isolation_level': ISOLATION_LEVEL_SERIALIZABLE,
19+ },
20+ },
21 }
22
23 # Absolute filesystem path to the directory that will hold user-uploaded files.
24
25=== modified file 'src/maas/settings.py'
26--- src/maas/settings.py 2014-05-05 07:45:06 +0000
27+++ src/maas/settings.py 2014-05-07 22:26:56 +0000
28@@ -21,6 +21,7 @@
29 import django.template
30 from maas import import_local_settings
31 from metadataserver.address import guess_server_address
32+from psycopg2.extensions import ISOLATION_LEVEL_SERIALIZABLE
33
34
35 django.template.add_to_builtins('django.templatetags.future')
36@@ -138,7 +139,10 @@
37 # Unix socket directory.
38 'HOST': '',
39 'PORT': '',
40- }
41+ 'OPTIONS': {
42+ 'isolation_level': ISOLATION_LEVEL_SERIALIZABLE,
43+ },
44+ },
45 }
46
47 # Local time zone for this installation. Choices can be found here:

Subscribers

People subscribed via source and target branches

to all changes: