Commit d3a1bc6a authored by Tim Peters's avatar Tim Peters

Merge rev 28660 from 3.3 branch.

More code and comment cleanups.  Notable changes:

FileCache:  removed the currentsize attribute.  It was initialized
to 0 but never updated.  Some tests referenced it, but since it was
always 0 those tests weren't getting any good from it.  Don't
recall (or never knew) what its intended purpose may have been.

FileCache.remove():  Repaired major bug.  This mistakenly stored
the "this disk block is free now" status byte into the start of
the serialized Object record's end_tid field (incorrect seek
offset).  The in-memory structures were correct then, but got out
of synch with the disk file; the latter then still claimed to have
info for a "live" object revision, but that revision was actually
dead, and the info on disk had a corrupt end_tid value.
parent b4a7954c
...@@ -55,6 +55,12 @@ What's new in ZODB3 3.3.1? ...@@ -55,6 +55,12 @@ What's new in ZODB3 3.3.1?
========================== ==========================
Release date: xx-xxx-2004 Release date: xx-xxx-2004
ZEO client cache
----------------
- Fixed a bug wherein an object removed from the client cache didn't
properly mark the file slice it occupied as being available for reuse.
persistent persistent
---------- ----------
......
This diff is collapsed.
...@@ -114,13 +114,11 @@ class CacheTests(unittest.TestCase): ...@@ -114,13 +114,11 @@ class CacheTests(unittest.TestCase):
n = p64(i) n = p64(i)
self.cache.store(n, "", n, None, data[i]) self.cache.store(n, "", n, None, data[i])
self.assertEquals(len(self.cache), i + 1) self.assertEquals(len(self.cache), i + 1)
self.assert_(self.cache.fc.currentsize < maxsize)
# The cache now uses 1225 bytes. The next insert # The cache now uses 1225 bytes. The next insert
# should delete some objects. # should delete some objects.
n = p64(50) n = p64(50)
self.cache.store(n, "", n, None, data[51]) self.cache.store(n, "", n, None, data[51])
self.assert_(len(self.cache) < 51) self.assert_(len(self.cache) < 51)
self.assert_(self.cache.fc.currentsize <= maxsize)
# XXX Need to make sure eviction of non-current data # XXX Need to make sure eviction of non-current data
# and of version data are handled correctly. # and of version data are handled correctly.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment