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
ea06d610
Commit
ea06d610
authored
Aug 06, 2002
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix pack(wait=1) implementation so that it actually waits.
parent
7e8bd95f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
src/ZEO/StorageServer.py
src/ZEO/StorageServer.py
+11
-6
No files found.
src/ZEO/StorageServer.py
View file @
ea06d610
...
...
@@ -29,7 +29,7 @@ import threading
from
ZEO
import
ClientStub
from
ZEO.CommitLog
import
CommitLog
from
ZEO.zrpc.server
import
Dispatcher
from
ZEO.zrpc.connection
import
ManagedServerConnection
,
Delay
from
ZEO.zrpc.connection
import
ManagedServerConnection
,
Delay
,
MTDelay
import
zLOG
from
ZODB.POSException
import
StorageError
,
StorageTransactionError
,
\
...
...
@@ -238,25 +238,30 @@ class ZEOStorage:
def
modifiedInVersion
(
self
,
oid
):
return
self
.
__storage
.
modifiedInVersion
(
oid
)
def
pack
(
self
,
t
,
wait
=
0
):
def
pack
(
self
,
t
,
wait
=
None
):
if
wait
is
not
None
:
wait
=
MTDelay
()
t
=
threading
.
Thread
(
target
=
self
.
_pack
,
args
=
(
t
,
wait
))
t
.
start
()
if
wait
is
not
None
:
return
wait
def
_pack
(
self
,
t
,
wait
=
0
):
def
_pack
(
self
,
t
,
delay
):
try
:
self
.
__storage
.
pack
(
t
,
referencesf
)
except
:
self
.
_log
(
'Pack failed for %s'
%
self
.
__storage_id
,
zLOG
.
ERROR
,
error
=
sys
.
exc_info
())
if
wait
:
if
delay
is
not
None
:
raise
else
:
# XXX Why doesn't we broadcast on wait?
if
not
wait
:
if
delay
is
None
:
# Broadcast new size statistics
self
.
server
.
invalidate
(
0
,
self
.
__storage_id
,
(),
self
.
get_size_info
())
else
:
delay
.
reply
(
None
)
def
new_oids
(
self
,
n
=
100
):
"""Return a sequence of n new oids, where n defaults to 100"""
...
...
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