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
51a63113
Commit
51a63113
authored
Jul 19, 2016
by
Jim Fulton
Committed by
GitHub
Jul 19, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #50 from zopefoundation/asyncio-cleanups
Asyncio cleanups
parents
671a5fb8
dd2d97cd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
37 deletions
+3
-37
src/ZEO/ClientStorage.py
src/ZEO/ClientStorage.py
+1
-1
src/ZEO/StorageServer.py
src/ZEO/StorageServer.py
+2
-28
src/ZEO/interfaces.py
src/ZEO/interfaces.py
+0
-8
No files found.
src/ZEO/ClientStorage.py
View file @
51a63113
...
@@ -490,7 +490,7 @@ class ClientStorage(ZODB.ConflictResolution.ConflictResolvingStorage):
...
@@ -490,7 +490,7 @@ class ClientStorage(ZODB.ConflictResolution.ConflictResolvingStorage):
return
self
.
_call
(
'record_iternext'
,
next
)
return
self
.
_call
(
'record_iternext'
,
next
)
def
getTid
(
self
,
oid
):
def
getTid
(
self
,
oid
):
# XXX deprecated:
used by storage server for full cache verification.
# XXX deprecated:
but ZODB tests use this. They shouldn't
return
self
.
_call
(
'getTid'
,
oid
)
return
self
.
_call
(
'getTid'
,
oid
)
def
loadSerial
(
self
,
oid
,
serial
):
def
loadSerial
(
self
,
oid
,
serial
):
...
...
src/ZEO/StorageServer.py
View file @
51a63113
...
@@ -76,10 +76,6 @@ registered_methods = set(( 'get_info', 'lastTransaction',
...
@@ -76,10 +76,6 @@ registered_methods = set(( 'get_info', 'lastTransaction',
class
ZEOStorage
:
class
ZEOStorage
:
"""Proxy to underlying storage for a single remote client."""
"""Proxy to underlying storage for a single remote client."""
# A list of extension methods. A subclass with extra methods
# should override.
extensions
=
[]
connected
=
connection
=
stats
=
storage
=
storage_id
=
transaction
=
None
connected
=
connection
=
stats
=
storage
=
storage_id
=
transaction
=
None
blob_tempfile
=
None
blob_tempfile
=
None
log_label
=
'unconnected'
log_label
=
'unconnected'
...
@@ -91,10 +87,6 @@ class ZEOStorage:
...
@@ -91,10 +87,6 @@ class ZEOStorage:
self
.
client_conflict_resolution
=
server
.
client_conflict_resolution
self
.
client_conflict_resolution
=
server
.
client_conflict_resolution
# timeout and stats will be initialized in register()
# timeout and stats will be initialized in register()
self
.
read_only
=
read_only
self
.
read_only
=
read_only
# The authentication protocol may define extra methods.
self
.
_extensions
=
{}
for
func
in
self
.
extensions
:
self
.
_extensions
[
func
.
__name__
]
=
None
self
.
_iterators
=
{}
self
.
_iterators
=
{}
self
.
_iterator_ids
=
itertools
.
count
()
self
.
_iterator_ids
=
itertools
.
count
()
# Stores the last item that was handed out for a
# Stores the last item that was handed out for a
...
@@ -148,23 +140,13 @@ class ZEOStorage:
...
@@ -148,23 +140,13 @@ class ZEOStorage:
if
not
info
[
'supportsUndo'
]:
if
not
info
[
'supportsUndo'
]:
self
.
undoLog
=
self
.
undoInfo
=
lambda
*
a
,
**
k
:
()
self
.
undoLog
=
self
.
undoInfo
=
lambda
*
a
,
**
k
:
()
# XXX deprecated: but ZODB tests use getTid. They shouldn't
self
.
getTid
=
storage
.
getTid
self
.
getTid
=
storage
.
getTid
self
.
load
=
storage
.
load
self
.
loadSerial
=
storage
.
loadSerial
self
.
loadSerial
=
storage
.
loadSerial
record_iternext
=
getattr
(
storage
,
'record_iternext'
,
None
)
record_iternext
=
getattr
(
storage
,
'record_iternext'
,
None
)
if
record_iternext
is
not
None
:
if
record_iternext
is
not
None
:
self
.
record_iternext
=
record_iternext
self
.
record_iternext
=
record_iternext
try
:
fn
=
storage
.
getExtensionMethods
except
AttributeError
:
pass
# no extension methods
else
:
d
=
fn
()
self
.
_extensions
.
update
(
d
)
for
name
in
d
:
assert
not
hasattr
(
self
,
name
)
setattr
(
self
,
name
,
getattr
(
storage
,
name
))
self
.
lastTransaction
=
storage
.
lastTransaction
self
.
lastTransaction
=
storage
.
lastTransaction
try
:
try
:
...
@@ -250,7 +232,6 @@ class ZEOStorage:
...
@@ -250,7 +232,6 @@ class ZEOStorage:
'size'
:
storage
.
getSize
(),
'size'
:
storage
.
getSize
(),
'name'
:
storage
.
getName
(),
'name'
:
storage
.
getName
(),
'supportsUndo'
:
supportsUndo
,
'supportsUndo'
:
supportsUndo
,
'extensionMethods'
:
self
.
getExtensionMethods
(),
'supports_record_iternext'
:
hasattr
(
self
,
'record_iternext'
),
'supports_record_iternext'
:
hasattr
(
self
,
'record_iternext'
),
'interfaces'
:
tuple
(
interfaces
),
'interfaces'
:
tuple
(
interfaces
),
}
}
...
@@ -260,13 +241,6 @@ class ZEOStorage:
...
@@ -260,13 +241,6 @@ class ZEOStorage:
'size'
:
self
.
storage
.
getSize
(),
'size'
:
self
.
storage
.
getSize
(),
}
}
def
getExtensionMethods
(
self
):
return
self
.
_extensions
def
loadEx
(
self
,
oid
):
self
.
stats
.
loads
+=
1
return
self
.
storage
.
load
(
oid
,
''
)
def
loadBefore
(
self
,
oid
,
tid
):
def
loadBefore
(
self
,
oid
,
tid
):
self
.
stats
.
loads
+=
1
self
.
stats
.
loads
+=
1
return
self
.
storage
.
loadBefore
(
oid
,
tid
)
return
self
.
storage
.
loadBefore
(
oid
,
tid
)
...
...
src/ZEO/interfaces.py
View file @
51a63113
...
@@ -90,14 +90,6 @@ class IServeable(zope.interface.Interface):
...
@@ -90,14 +90,6 @@ class IServeable(zope.interface.Interface):
"""Interface provided by storages that can be served by ZEO
"""Interface provided by storages that can be served by ZEO
"""
"""
def
getTid
(
oid
):
"""The last transaction to change an object
Return the transaction id of the last transaction that committed a
change to an object with the given object id.
"""
def
tpc_transaction
():
def
tpc_transaction
():
"""The current transaction being committed.
"""The current transaction being committed.
...
...
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