Commit e5b511ff authored by Jim Fulton's avatar Jim Fulton

Need to check size on reads, not just writes.

parent 1930237e
......@@ -84,7 +84,7 @@
##############################################################################
"""Network ZODB storage client
"""
__version__='$Revision: 1.14 $'[11:-2]
__version__='$Revision: 1.15 $'[11:-2]
import struct, time, os, socket, string, Sync, zrpc, ClientCache
import tempfile, Invalidator, ExtensionClass, thread
......@@ -289,10 +289,12 @@ class ClientStorage(ExtensionClass.Base, BaseStorage.BaseStorage):
def load(self, oid, version, _stuff=None):
self._lock_acquire()
try:
p = self._cache.load(oid, version)
cache=self._cache
p = cache.load(oid, version)
if p: return p
p, s, v, pv, sv = self._call('zeoLoad', oid)
self._cache.store(oid, p, s, v, pv, sv)
cache.checkSize(size)
cache.store(oid, p, s, v, pv, sv)
if not v or not version or version != v:
if s: return p, s
raise KeyError, oid # no non-version data for this
......
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