Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZODB
Commits
357af601
Commit
357af601
authored
Feb 15, 2001
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
see 1.24.54.3
parent
8019e211
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
trunk/src/ZODB/Transaction.py
trunk/src/ZODB/Transaction.py
+18
-4
No files found.
trunk/src/ZODB/Transaction.py
View file @
357af601
...
...
@@ -84,8 +84,8 @@
##############################################################################
"""Transaction management
$Id: Transaction.py,v 1.2
5 2001/01/18 18:12:21
jim Exp $"""
__version__
=
'$Revision: 1.2
5
$'
[
11
:
-
2
]
$Id: Transaction.py,v 1.2
6 2001/02/15 20:01:12
jim Exp $"""
__version__
=
'$Revision: 1.2
6
$'
[
11
:
-
2
]
import
time
,
sys
,
struct
,
POSException
from
struct
import
pack
...
...
@@ -103,6 +103,7 @@ class Transaction:
_connections
=
None
_extension
=
None
_sub
=
None
# This is a subtrasaction flag
_sub_no_partial_abort
=
None
def
__init__
(
self
,
id
=
None
):
self
.
_id
=
id
...
...
@@ -136,6 +137,13 @@ class Transaction:
This is called from the application. This means that we haven
\
'
t
entered two-phase commit yet, so no tpc_ messages are sent.
'''
if
subtransaction
and
self
.
_sub_no_partial_abort
:
raise
POSException
.
TransactionError
,
(
"""Attempted to abort a sub-transaction, but a participating
data manager doesn't support partial abort.
"""
)
t
=
v
=
tb
=
None
subj
=
self
.
_sub
subjars
=
()
...
...
@@ -146,6 +154,7 @@ class Transaction:
# subtransactions.
subjars
=
subj
.
values
()
self
.
_sub
=
None
self
.
_sub_no_partial_abort
=
None
try
:
# Abort the objects
...
...
@@ -200,6 +209,7 @@ class Transaction:
objects
=
[]
subjars
=
subj
.
values
()
self
.
_sub
=
None
self
.
_sub_no_partial_abort
=
None
t
=
v
=
tb
=
None
...
...
@@ -245,8 +255,12 @@ class Transaction:
if
not
jars
.
has_key
(
i
):
jars
[
i
]
=
j
if
subtransaction
:
subj
[
i
]
=
j
j
.
tpc_begin
(
self
,
subtransaction
)
try
:
j
.
tpc_begin
(
self
,
subtransaction
)
except
TypeError
:
j
.
tpc_begin
(
self
)
self
.
_sub_no_partial_abort
=
1
else
:
subj
[
i
]
=
j
else
:
j
.
tpc_begin
(
self
)
j
.
commit
(
o
,
self
)
...
...
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