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):
...
@@ -474,8 +474,11 @@ class ClientStorage(ZODB.ConflictResolution.ConflictResolvingStorage):
raise
POSException
.
ReadOnlyError
()
raise
POSException
.
ReadOnlyError
()
try
:
try
:
buf
=
trans
.
__buf
buf
=
trans
.
data
(
self
)
except
AttributeError
:
except
KeyError
:
buf
=
None
if
buf
is
None
:
raise
POSException
.
StorageTransactionError
(
raise
POSException
.
StorageTransactionError
(
"Transaction not committing"
,
meth
,
trans
)
"Transaction not committing"
,
meth
,
trans
)
...
@@ -796,18 +799,26 @@ class ClientStorage(ZODB.ConflictResolution.ConflictResolvingStorage):
...
@@ -796,18 +799,26 @@ class ClientStorage(ZODB.ConflictResolution.ConflictResolvingStorage):
raise
POSException
.
ReadOnlyError
()
raise
POSException
.
ReadOnlyError
()
try
:
try
:
tbuf
=
txn
.
__buf
tbuf
=
txn
.
data
(
self
)
except
AttributeError
:
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
:
else
:
raise
POSException
.
StorageTransactionError
(
if
tbuf
is
not
None
:
"Duplicate tpc_begin calls for same transaction"
)
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,
# XXX we'd like to allow multiple transactions at a time at some point,
# but for now, due to server limitations, TCBOO.
# but for now, due to server limitations, TCBOO.
self
.
_commit_lock
.
acquire
()
self
.
_commit_lock
.
acquire
()
self
.
_tbuf
=
t
buf
self
.
_tbuf
=
t
xn
.
data
(
self
)
try
:
try
:
self
.
_async
(
self
.
_async
(
...
@@ -818,13 +829,10 @@ class ClientStorage(ZODB.ConflictResolution.ConflictResolvingStorage):
...
@@ -818,13 +829,10 @@ class ClientStorage(ZODB.ConflictResolution.ConflictResolvingStorage):
raise
raise
def
tpc_end
(
self
,
txn
):
def
tpc_end
(
self
,
txn
):
try
:
tbuf
=
txn
.
data
(
self
)
tbuf
=
txn
.
__buf
if
tbuf
is
not
None
:
except
AttributeError
:
pass
else
:
del
txn
.
__buf
tbuf
.
close
()
tbuf
.
close
()
txn
.
set_data
(
self
,
None
)
self
.
_commit_lock
.
release
()
self
.
_commit_lock
.
release
()
def
lastTransaction
(
self
):
def
lastTransaction
(
self
):
...
@@ -837,8 +845,8 @@ class ClientStorage(ZODB.ConflictResolution.ConflictResolvingStorage):
...
@@ -837,8 +845,8 @@ class ClientStorage(ZODB.ConflictResolution.ConflictResolvingStorage):
they normally would.)
they normally would.)
"""
"""
try
:
try
:
tbuf
=
txn
.
__buf
tbuf
=
txn
.
data
(
self
)
except
Attribute
Error
:
except
Key
Error
:
return
return
try
:
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