Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
14ac0895
Commit
14ac0895
authored
Apr 26, 2005
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged rev 30192 from 3.4 branch.
Trimmed trailing whitespace.
parent
d86d93bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
src/transaction/_transaction.py
src/transaction/_transaction.py
+11
-11
No files found.
src/transaction/_transaction.py
View file @
14ac0895
...
@@ -268,7 +268,7 @@ class Transaction(object):
...
@@ -268,7 +268,7 @@ class Transaction(object):
except
:
except
:
self
.
_cleanup
(
self
.
_resources
)
self
.
_cleanup
(
self
.
_resources
)
self
.
_saveCommitishError
()
# reraises!
self
.
_saveCommitishError
()
# reraises!
if
self
.
_last_savepoint
is
not
None
:
if
self
.
_last_savepoint
is
not
None
:
savepoint
.
previous
=
self
.
_last_savepoint
savepoint
.
previous
=
self
.
_last_savepoint
self
.
_last_savepoint
.
next
=
savepoint
self
.
_last_savepoint
.
next
=
savepoint
...
@@ -326,7 +326,7 @@ class Transaction(object):
...
@@ -326,7 +326,7 @@ class Transaction(object):
# TODO depricate subtransactions
# TODO depricate subtransactions
self
.
savepoint
(
1
)
self
.
savepoint
(
1
)
return
return
if
self
.
status
is
Status
.
COMMITFAILED
:
if
self
.
status
is
Status
.
COMMITFAILED
:
self
.
_prior_operation_failed
()
# doesn't return
self
.
_prior_operation_failed
()
# doesn't return
...
@@ -437,7 +437,7 @@ class Transaction(object):
...
@@ -437,7 +437,7 @@ class Transaction(object):
return
return
self
.
_invalidate_last_savepoint
()
self
.
_invalidate_last_savepoint
()
self
.
_synchronizers
.
map
(
lambda
s
:
s
.
beforeCompletion
(
self
))
self
.
_synchronizers
.
map
(
lambda
s
:
s
.
beforeCompletion
(
self
))
tb
=
None
tb
=
None
...
@@ -452,7 +452,7 @@ class Transaction(object):
...
@@ -452,7 +452,7 @@ class Transaction(object):
if
self
.
_manager
:
if
self
.
_manager
:
self
.
_manager
.
free
(
self
)
self
.
_manager
.
free
(
self
)
self
.
_synchronizers
.
map
(
lambda
s
:
s
.
afterCompletion
(
self
))
self
.
_synchronizers
.
map
(
lambda
s
:
s
.
afterCompletion
(
self
))
self
.
log
.
debug
(
"abort"
)
self
.
log
.
debug
(
"abort"
)
...
@@ -576,7 +576,7 @@ class DataManagerAdapter(object):
...
@@ -576,7 +576,7 @@ class DataManagerAdapter(object):
# We don't do anything here because ZODB4-style data managers
# We don't do anything here because ZODB4-style data managers
# didn't have a separate tpc_begin step
# didn't have a separate tpc_begin step
pass
pass
def
tpc_abort
(
self
,
transaction
):
def
tpc_abort
(
self
,
transaction
):
self
.
_datamanager
.
abort
(
transaction
)
self
.
_datamanager
.
abort
(
transaction
)
...
@@ -594,7 +594,7 @@ class Savepoint:
...
@@ -594,7 +594,7 @@ class Savepoint:
Transaction savepoints coordinate savepoints for data managers
Transaction savepoints coordinate savepoints for data managers
participating in a transaction.
participating in a transaction.
"""
"""
interface
.
implements
(
interfaces
.
ISavepoint
)
interface
.
implements
(
interfaces
.
ISavepoint
)
...
@@ -614,17 +614,17 @@ class Savepoint:
...
@@ -614,17 +614,17 @@ class Savepoint:
savepoint
=
NoRollbackSavepoint
(
datamanager
)
savepoint
=
NoRollbackSavepoint
(
datamanager
)
else
:
else
:
savepoint
=
savepoint
()
savepoint
=
savepoint
()
savepoints
.
append
(
savepoint
)
savepoints
.
append
(
savepoint
)
def
join
(
self
,
datamanager
):
def
join
(
self
,
datamanager
):
# A data manager has joined a transaction *after* a savepoint
# A data manager has joined a transaction *after* a savepoint
# was created. A couple of things are different in this case:
# was created. A couple of things are different in this case:
# 1. We need to add it's savepoint to all previous savepoints.
# 1. We need to add it's savepoint to all previous savepoints.
# so that if they are rolled back, we roll this was back too.
# so that if they are rolled back, we roll this was back too.
# 2. We don't actualy need to ask it for a savepoint. Because
# 2. We don't actualy need to ask it for a savepoint. Because
# is just joining, then we can abort it if there is an error,
# is just joining, then we can abort it if there is an error,
# so we use an AbortSavepoint.
# so we use an AbortSavepoint.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment