Storm should try to support two-phase commit where possible
Bug #132485 reported by
Christopher Armstrong
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Landscape Server |
Invalid
|
Wishlist
|
Unassigned | ||
Launchpad itself |
Invalid
|
Low
|
Unassigned | ||
Storm |
Fix Released
|
Wishlist
|
Free Ekanayaka | ||
psycopg |
Fix Released
|
Undecided
|
Unassigned | ||
psycopg2 (Ubuntu) |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
Certain databases support two-phase commit. Here's the proposed API:
store.prepare()
...
store.commit_
The implementation of these methods should indirect through the backends, perhaps with something like self._connectio
If a database backend doesn't support two-phase commit, these methods should raise some sort of well-defined "Unsupported" exception.
Related branches
lp:~free.ekanayaka/storm/tpc-support
- Thomas Herve (community): Approve
- Stuart Bishop (community): Approve
- Diff: 0 lines
Changed in psycopg: | |
status: | Unknown → Confirmed |
Changed in psycopg: | |
status: | Confirmed → New |
Changed in storm: | |
importance: | Undecided → Wishlist |
status: | New → Confirmed |
Changed in launchpad: | |
importance: | Undecided → High |
status: | New → Triaged |
Changed in launchpad-foundations: | |
milestone: | none → 2.1.12 |
Changed in landscape: | |
importance: | Undecided → Wishlist |
Changed in launchpad-foundations: | |
milestone: | 2.1.12 → 2.2.1 |
Changed in launchpad-foundations: | |
milestone: | 2.2.1 → 2.2.2 |
Changed in landscape: | |
milestone: | none → later |
Changed in psycopg2 (Ubuntu): | |
importance: | Undecided → Wishlist |
status: | New → Confirmed |
Changed in storm: | |
status: | Confirmed → In Progress |
assignee: | nobody → Free Ekanayaka (free.ekanayaka) |
milestone: | none → 0.20 |
Changed in launchpad: | |
status: | Triaged → Invalid |
Changed in psycopg2 (Ubuntu): | |
status: | Confirmed → Fix Released |
Changed in storm: | |
status: | In Progress → Fix Committed |
Changed in storm: | |
status: | Fix Committed → Fix Released |
affects: | launchpad → ubuntu-beginners-launchpad-projects |
Changed in ubuntu-beginners-launchpad-projects: | |
status: | Invalid → New |
affects: | ubuntu-beginners-launchpad-projects → launchpad |
Changed in launchpad: | |
status: | New → Invalid |
To post a comment you must log in.
You probably also need an rollback_prepared() for the case where some other resource fails the first phase of the commit and you want to abort the transaction.
The other form this API could take up is for store.commit() and store.rollback() to perform the second phase of a commit if prepare() was called, and make prepare() a no-op for backends that do not support two-phase commit. This is essentially how Zope transaction data managers that don't support two-phase commit are implemented.