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
43a7b3cf
Commit
43a7b3cf
authored
Feb 15, 2001
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
see 1.24.54.3
parent
70738f19
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
src/ZODB/Transaction.py
src/ZODB/Transaction.py
+18
-4
No files found.
src/ZODB/Transaction.py
View file @
43a7b3cf
...
@@ -84,8 +84,8 @@
...
@@ -84,8 +84,8 @@
##############################################################################
##############################################################################
"""Transaction management
"""Transaction management
$Id: Transaction.py,v 1.2
5 2001/01/18 18:12:21
jim Exp $"""
$Id: Transaction.py,v 1.2
6 2001/02/15 20:01:12
jim Exp $"""
__version__
=
'$Revision: 1.2
5
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
6
$'
[
11
:
-
2
]
import
time
,
sys
,
struct
,
POSException
import
time
,
sys
,
struct
,
POSException
from
struct
import
pack
from
struct
import
pack
...
@@ -103,6 +103,7 @@ class Transaction:
...
@@ -103,6 +103,7 @@ class Transaction:
_connections
=
None
_connections
=
None
_extension
=
None
_extension
=
None
_sub
=
None
# This is a subtrasaction flag
_sub
=
None
# This is a subtrasaction flag
_sub_no_partial_abort
=
None
def
__init__
(
self
,
id
=
None
):
def
__init__
(
self
,
id
=
None
):
self
.
_id
=
id
self
.
_id
=
id
...
@@ -136,6 +137,13 @@ class Transaction:
...
@@ -136,6 +137,13 @@ class Transaction:
This is called from the application. This means that we haven
\
'
t
This is called from the application. This means that we haven
\
'
t
entered two-phase commit yet, so no tpc_ messages are sent.
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
t
=
v
=
tb
=
None
subj
=
self
.
_sub
subj
=
self
.
_sub
subjars
=
()
subjars
=
()
...
@@ -146,6 +154,7 @@ class Transaction:
...
@@ -146,6 +154,7 @@ class Transaction:
# subtransactions.
# subtransactions.
subjars
=
subj
.
values
()
subjars
=
subj
.
values
()
self
.
_sub
=
None
self
.
_sub
=
None
self
.
_sub_no_partial_abort
=
None
try
:
try
:
# Abort the objects
# Abort the objects
...
@@ -200,6 +209,7 @@ class Transaction:
...
@@ -200,6 +209,7 @@ class Transaction:
objects
=
[]
objects
=
[]
subjars
=
subj
.
values
()
subjars
=
subj
.
values
()
self
.
_sub
=
None
self
.
_sub
=
None
self
.
_sub_no_partial_abort
=
None
t
=
v
=
tb
=
None
t
=
v
=
tb
=
None
...
@@ -245,8 +255,12 @@ class Transaction:
...
@@ -245,8 +255,12 @@ class Transaction:
if
not
jars
.
has_key
(
i
):
if
not
jars
.
has_key
(
i
):
jars
[
i
]
=
j
jars
[
i
]
=
j
if
subtransaction
:
if
subtransaction
:
subj
[
i
]
=
j
try
:
j
.
tpc_begin
(
self
,
subtransaction
)
j
.
tpc_begin
(
self
,
subtransaction
)
except
TypeError
:
j
.
tpc_begin
(
self
)
self
.
_sub_no_partial_abort
=
1
else
:
subj
[
i
]
=
j
else
:
else
:
j
.
tpc_begin
(
self
)
j
.
tpc_begin
(
self
)
j
.
commit
(
o
,
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