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
ca594f54
Commit
ca594f54
authored
Dec 03, 2007
by
Christian Theune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug 98275: Made ZEO cache more tolerant when invalidating current object
versions.
parent
6ed4ed3f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
1 deletion
+31
-1
NEWS.txt
NEWS.txt
+3
-0
src/ZEO/cache.py
src/ZEO/cache.py
+1
-1
src/ZEO/tests/testZEO.py
src/ZEO/tests/testZEO.py
+27
-0
No files found.
NEWS.txt
View file @
ca594f54
...
...
@@ -40,6 +40,9 @@ General
ZEO
---
- (3.9.0a1) Bug #98275: Made ZEO cache more tolerant when invalidating current
versions of objects.
- (3.9.0a1) Fixed a serious bug that could cause client I/O to stop
(hang). This was accomonied by a critical log message along the
lines of: "RuntimeError: dictionary changed size during iteration".
...
...
src/ZEO/cache.py
View file @
ca594f54
...
...
@@ -364,7 +364,7 @@ class ClientCache(object):
return
# Add the data we have to the list of non-current data for oid.
assert
tid
is
not
None
and
cur_tid
<
tid
assert
tid
is
not
None
and
cur_tid
<
=
tid
# 0x1C = invalidate (hit, saving non-current)
self
.
_trace
(
0x1C
,
oid
,
version
,
tid
)
del
self
.
current
[
oid
]
# because we no longer have current data
...
...
src/ZEO/tests/testZEO.py
View file @
ca594f54
...
...
@@ -34,6 +34,8 @@ import ZODB.blob
import
ZODB.tests.util
from
ZODB.tests.MinPO
import
MinPO
from
ZODB.tests.StorageTestBase
import
zodb_unpickle
import
persistent
import
transaction
# ZODB test mixin classes
from
ZODB.tests
import
StorageTestBase
,
BasicStorage
,
VersionStorage
,
\
...
...
@@ -67,9 +69,34 @@ class OneTimeTests(unittest.TestCase):
# be identical.
self
.
assertEqual
(
ZODB
.
__version__
,
ZEO
.
version
)
class
CreativeGetState
(
persistent
.
Persistent
):
def
__getstate__
(
self
):
self
.
name
=
'me'
return
super
(
CreativeGetState
,
self
).
__getstate__
()
class
MiscZEOTests
:
"""ZEO tests that don't fit in elsewhere."""
def
checkCreativeGetState
(
self
):
# This test covers persistent objects that provide their own
# __getstate__ which modifies the state of the object.
# For details see bug #98275
db
=
ZODB
.
DB
(
self
.
_storage
)
cn
=
db
.
open
()
rt
=
cn
.
root
()
m
=
CreativeGetState
()
m
.
attr
=
'hi'
rt
[
'a'
]
=
m
# This commit used to fail because of the `Mine` object being put back
# into `changed` state although it was already stored causing the ZEO
# cache to bail out.
transaction
.
commit
()
cn
.
close
()
def
checkLargeUpdate
(
self
):
obj
=
MinPO
(
"X"
*
(
10
*
128
*
1024
))
self
.
_dostore
(
data
=
obj
)
...
...
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