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
4438aef4
Commit
4438aef4
authored
Nov 18, 2016
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Go back to using the transactuon (and now transaction meta data) custom data api
parent
5c8e487a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
15 deletions
+23
-15
src/ZEO/ClientStorage.py
src/ZEO/ClientStorage.py
+23
-15
No files found.
src/ZEO/ClientStorage.py
View file @
4438aef4
...
...
@@ -474,8 +474,11 @@ class ClientStorage(ZODB.ConflictResolution.ConflictResolvingStorage):
raise
POSException
.
ReadOnlyError
()
try
:
buf
=
trans
.
__buf
except
AttributeError
:
buf
=
trans
.
data
(
self
)
except
KeyError
:
buf
=
None
if
buf
is
None
:
raise
POSException
.
StorageTransactionError
(
"Transaction not committing"
,
meth
,
trans
)
...
...
@@ -796,18 +799,26 @@ class ClientStorage(ZODB.ConflictResolution.ConflictResolvingStorage):
raise
POSException
.
ReadOnlyError
()
try
:
tbuf
=
txn
.
__buf
tbuf
=
txn
.
data
(
self
)
except
AttributeError
:
txn
.
__buf
=
tbuf
=
TransactionBuffer
(
self
.
_connection_generation
)
# Gaaaa. This is a recovery transaction. Work around this
# until we can think of something better. XXX
tb
=
{}
txn
.
data
=
tb
.
__getitem__
txn
.
set_data
=
tb
.
__setitem__
except
KeyError
:
pass
else
:
raise
POSException
.
StorageTransactionError
(
"Duplicate tpc_begin calls for same transaction"
)
if
tbuf
is
not
None
:
raise
POSException
.
StorageTransactionError
(
"Duplicate tpc_begin calls for same transaction"
)
txn
.
set_data
(
self
,
TransactionBuffer
(
self
.
_connection_generation
))
# XXX we'd like to allow multiple transactions at a time at some point,
# but for now, due to server limitations, TCBOO.
self
.
_commit_lock
.
acquire
()
self
.
_tbuf
=
t
buf
self
.
_tbuf
=
t
xn
.
data
(
self
)
try
:
self
.
_async
(
...
...
@@ -818,13 +829,10 @@ class ClientStorage(ZODB.ConflictResolution.ConflictResolvingStorage):
raise
def
tpc_end
(
self
,
txn
):
try
:
tbuf
=
txn
.
__buf
except
AttributeError
:
pass
else
:
del
txn
.
__buf
tbuf
=
txn
.
data
(
self
)
if
tbuf
is
not
None
:
tbuf
.
close
()
txn
.
set_data
(
self
,
None
)
self
.
_commit_lock
.
release
()
def
lastTransaction
(
self
):
...
...
@@ -837,8 +845,8 @@ class ClientStorage(ZODB.ConflictResolution.ConflictResolvingStorage):
they normally would.)
"""
try
:
tbuf
=
txn
.
__buf
except
Attribute
Error
:
tbuf
=
txn
.
data
(
self
)
except
Key
Error
:
return
try
:
...
...
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