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
8366ba1d
Commit
8366ba1d
authored
Aug 04, 2016
by
Jim Fulton
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/asyncio' into ClientDisconnected-is-transient
parents
98ac50eb
a07f8af3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
6 deletions
+21
-6
README.rst
README.rst
+2
-4
src/ZEO/tests/ZEO4/StorageServer.py
src/ZEO/tests/ZEO4/StorageServer.py
+2
-1
src/ZEO/tests/forker.py
src/ZEO/tests/forker.py
+1
-1
src/ZEO/tests/zeo-fan-out.test
src/ZEO/tests/zeo-fan-out.test
+16
-0
No files found.
README.rst
View file @
8366ba1d
...
@@ -180,12 +180,10 @@ Which is a short-hand for::
...
@@ -180,12 +180,10 @@ Which is a short-hand for::
connection = db.open()
connection = db.open()
If you exit the Python process, the storage exits as well, as it's run
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
in an in-process thread.
log file. This provides a handy way to get a configuration example.
You shut down the server more cleanly by calling the stop function
You shut down the server more cleanly by calling the stop function
returned by the ``ZEO.server`` function. This will remove the
returned by the ``ZEO.server`` function.
temporary configuration file.
To have data stored persistently, you can specify a file-storage path
To have data stored persistently, you can specify a file-storage path
name using a ``path`` parameter. If you want blob support, you can
name using a ``path`` parameter. If you want blob support, you can
...
...
src/ZEO/tests/ZEO4/StorageServer.py
View file @
8366ba1d
...
@@ -43,13 +43,14 @@ from ZEO.Exceptions import AuthError
...
@@ -43,13 +43,14 @@ from ZEO.Exceptions import AuthError
from
.monitor
import
StorageStats
,
StatsServer
from
.monitor
import
StorageStats
,
StatsServer
from
.zrpc.connection
import
ManagedServerConnection
,
Delay
,
MTDelay
,
Result
from
.zrpc.connection
import
ManagedServerConnection
,
Delay
,
MTDelay
,
Result
from
.zrpc.server
import
Dispatcher
from
.zrpc.server
import
Dispatcher
from
ZODB.ConflictResolution
import
ResolvedSerial
from
ZODB.loglevels
import
BLATHER
from
ZODB.loglevels
import
BLATHER
from
ZODB.POSException
import
StorageError
,
StorageTransactionError
from
ZODB.POSException
import
StorageError
,
StorageTransactionError
from
ZODB.POSException
import
TransactionError
,
ReadOnlyError
,
ConflictError
from
ZODB.POSException
import
TransactionError
,
ReadOnlyError
,
ConflictError
from
ZODB.serialize
import
referencesf
from
ZODB.serialize
import
referencesf
from
ZODB.utils
import
oid_repr
,
p64
,
u64
,
z64
from
ZODB.utils
import
oid_repr
,
p64
,
u64
,
z64
ResolvedSerial
=
b'rs'
logger
=
logging
.
getLogger
(
'ZEO.StorageServer'
)
logger
=
logging
.
getLogger
(
'ZEO.StorageServer'
)
def
log
(
message
,
level
=
logging
.
INFO
,
label
=
''
,
exc_info
=
False
):
def
log
(
message
,
level
=
logging
.
INFO
,
label
=
''
,
exc_info
=
False
):
...
...
src/ZEO/tests/forker.py
View file @
8366ba1d
...
@@ -139,6 +139,7 @@ def runner(config, qin, qout, timeout=None,
...
@@ -139,6 +139,7 @@ def runner(config, qin, qout, timeout=None,
)
)
thread
.
setDaemon
(
True
)
thread
.
setDaemon
(
True
)
thread
.
start
()
thread
.
start
()
os
.
remove
(
config
)
try
:
try
:
qin
.
get
(
timeout
=
timeout
)
# wait for shutdown
qin
.
get
(
timeout
=
timeout
)
# wait for shutdown
...
@@ -181,7 +182,6 @@ def stop_runner(thread, config, qin, qout, stop_timeout=9, pid=None):
...
@@ -181,7 +182,6 @@ def stop_runner(thread, config, qin, qout, stop_timeout=9, pid=None):
gc
.
collect
()
gc
.
collect
()
thread
.
join
(
stop_timeout
)
thread
.
join
(
stop_timeout
)
os
.
remove
(
config
)
def
start_zeo_server
(
storage_conf
=
None
,
zeo_conf
=
None
,
port
=
None
,
keep
=
False
,
def
start_zeo_server
(
storage_conf
=
None
,
zeo_conf
=
None
,
port
=
None
,
keep
=
False
,
path
=
'Data.fs'
,
protocol
=
None
,
blob_dir
=
None
,
path
=
'Data.fs'
,
protocol
=
None
,
blob_dir
=
None
,
...
...
src/ZEO/tests/zeo-fan-out.test
View file @
8366ba1d
...
@@ -25,6 +25,22 @@ Now, let's create some client storages that connect to these:
...
@@ -25,6 +25,22 @@ Now, let's create some client storages that connect to these:
>>> import os, ZEO, ZODB.blob, ZODB.POSException, transaction
>>> import os, ZEO, ZODB.blob, ZODB.POSException, transaction
>>> db0 = ZEO.DB(port0, blob_dir='cb0')
>>> db0 = ZEO.DB(port0, blob_dir='cb0')
XXX Work around a ZEO4 server bug (that was fixed in the ZEO5 server)
which prevents sending invalidations, and thus tids for transactions
that only add objects. This doesn't matter for ZODB4/ZEO4 but does
for ZODB5/ZEO5, with it's greater reliance on MVCC. This mainly
affects creation of the database root object, which is typically the
only transaction that only adds objects. Exacerbating this further is
that previously, databases didn't really use MVCC when checking for
the root object, but now they do because they go through a connection.
>>> with db0.transaction()
as
conn
:
... conn.root.work_around_zeo4_server_bug = 1
>>> with db0.transaction()
as
conn
:
... del conn.root.work_around_zeo4_server_bug
>>> db1 = ZEO.DB(addr1, blob_dir='cb1')
>>> db1 = ZEO.DB(addr1, blob_dir='cb1')
>>> tm1 = transaction.TransactionManager()
>>> tm1 = transaction.TransactionManager()
>>> c1 = db1.open(transaction_manager=tm1)
>>> c1 = db1.open(transaction_manager=tm1)
...
...
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