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
d0d8a855
Commit
d0d8a855
authored
Aug 05, 2016
by
Jim Fulton
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/asyncio' into server-sync
Conflicts: CHANGES.rst
parents
c2d864fe
6b85a572
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
45 additions
and
14 deletions
+45
-14
.travis.yml
.travis.yml
+6
-3
CHANGES.rst
CHANGES.rst
+12
-0
README.rst
README.rst
+2
-4
src/ZEO/Exceptions.py
src/ZEO/Exceptions.py
+12
-5
src/ZEO/StorageServer.py
src/ZEO/StorageServer.py
+2
-0
src/ZEO/tests/forker.py
src/ZEO/tests/forker.py
+1
-1
src/ZEO/tests/testZEO.py
src/ZEO/tests/testZEO.py
+10
-1
No files found.
.travis.yml
View file @
d0d8a855
language
:
python
sudo
:
false
cache
:
pip
directories
:
-
eggs
matrix
:
include
:
-
os
:
linux
...
...
@@ -24,9 +28,8 @@ matrix:
python
:
3.5
env
:
ZEO4_SERVER=1
install
:
-
pip install -U setuptools
-
python bootstrap.py
-
bin/buildout
-
pip install -U zc.buildout
-
buildout
script
:
-
bin/test -v1j99
notifications
:
...
...
CHANGES.rst
View file @
d0d8a855
...
...
@@ -6,6 +6,18 @@ Changelog
the beginning of transactions to wait for any outstanding
invalidations at the start of the transaction to be delivered.
- The ZEO server register method now returns the storage last
transaction, allowing the client to avoid an extra round trip during
cache verification.
- Client disconnect errors are now transient errors. When
applications retry jobs that raise transient errors, jobs (e.g. web
requests) with disconnect errors will be retried. Together with
blocking synchronous ZEO server calls for a limited time while
disconnected, this change should allow brief disconnections due to
server restart to avoid generating client-visible errors (e.g. 500
web responses).
- Fixed bugs in using the ZEO 5 client with ZEO 4 servers.
5.0.0a2 (2016-07-30)
...
...
README.rst
View file @
d0d8a855
...
...
@@ -180,12 +180,10 @@ Which is a short-hand for::
connection = db.open()
If you exit the Python process, the storage exits as well, as it's run
in an in-process thread. It will leave behind it's configuration and
log file. This provides a handy way to get a configuration example.
in an in-process thread.
You shut down the server more cleanly by calling the stop function
returned by the ``ZEO.server`` function. This will remove the
temporary configuration file.
returned by the ``ZEO.server`` function.
To have data stored persistently, you can specify a file-storage path
name using a ``path`` parameter. If you want blob support, you can
...
...
src/ZEO/Exceptions.py
View file @
d0d8a855
...
...
@@ -13,19 +13,26 @@
##############################################################################
"""Exceptions for ZEO."""
import
transaction.interfaces
from
ZODB.POSException
import
StorageError
class
ClientStorageError
(
StorageError
):
"""An error occurred in the ZEO Client Storage."""
"""An error occurred in the ZEO Client Storage.
"""
class
UnrecognizedResult
(
ClientStorageError
):
"""A server call returned an unrecognized result."""
"""A server call returned an unrecognized result.
"""
class
ClientDisconnected
(
ClientStorageError
):
"""The database storage is disconnected from the storage."""
class
ClientDisconnected
(
ClientStorageError
,
transaction
.
interfaces
.
TransientError
):
"""The database storage is disconnected from the storage.
"""
class
AuthError
(
StorageError
):
"""The client provided invalid authentication credentials."""
"""The client provided invalid authentication credentials.
"""
class
ProtocolError
(
ClientStorageError
):
"""A client contacted a server with an incomparible protocol
...
...
src/ZEO/StorageServer.py
View file @
d0d8a855
...
...
@@ -222,6 +222,8 @@ class ZEOStorage:
self
.
stats
=
self
.
server
.
register_connection
(
storage_id
,
self
)
self
.
lock_manager
=
self
.
server
.
lock_managers
[
storage_id
]
return
self
.
lastTransaction
()
def
get_info
(
self
):
storage
=
self
.
storage
...
...
src/ZEO/tests/forker.py
View file @
d0d8a855
...
...
@@ -139,6 +139,7 @@ def runner(config, qin, qout, timeout=None,
)
thread
.
setDaemon
(
True
)
thread
.
start
()
os
.
remove
(
config
)
try
:
qin
.
get
(
timeout
=
timeout
)
# wait for shutdown
...
...
@@ -181,7 +182,6 @@ def stop_runner(thread, config, qin, qout, stop_timeout=9, pid=None):
gc
.
collect
()
thread
.
join
(
stop_timeout
)
os
.
remove
(
config
)
def
start_zeo_server
(
storage_conf
=
None
,
zeo_conf
=
None
,
port
=
None
,
keep
=
False
,
path
=
'Data.fs'
,
protocol
=
None
,
blob_dir
=
None
,
...
...
src/ZEO/tests/testZEO.py
View file @
d0d8a855
...
...
@@ -831,7 +831,8 @@ Now we'll open a storage server on the data, simulating a restart:
>>> sv = StorageServer(None, dict(fs=fs))
>>> s = ZEOStorage(sv, sv.read_only)
>>> s.notify_connected(FauxConn())
>>> s.register('fs', False)
>>> s.register('fs', False) == fs.lastTransaction()
True
If we ask for the last transaction, we should get the last transaction
we saved:
...
...
@@ -1411,6 +1412,14 @@ call to the server. we'd get some sort of error here.
"""
def
ClientDisconnected_errors_are_TransientErrors
():
"""
>>> from ZEO.Exceptions import ClientDisconnected
>>> from transaction.interfaces import TransientError
>>> issubclass(ClientDisconnected, TransientError)
True
"""
if
sys
.
platform
.
startswith
(
'win'
):
...
...
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