Commit e05ff0d9 authored by Jim Fulton's avatar Jim Fulton

Fixed a serious bug that caused cache failures when run

with Python optimization turned on.
parent fdc6d086
Whats new in ZODB 3.8.6 (2010-??-??)
====================================
Bug Fixed:
- Fixed a serious bug that caused cache failures when run
with Python optimization turned on.
https://bugs.launchpad.net/zodb/+bug/544305
Whats new in ZODB 3.8.5 (2009-12-16)
====================================
......
......@@ -416,7 +416,8 @@ class ClientCache(object):
return None
self.f.seek(ofs)
read = self.f.read
assert read(1) == 'a', (ofs, self.f.tell(), oid)
status = read(1)
assert status == 'a', (ofs, self.f.tell(), oid)
size, saved_oid, tid, end_tid, lver, ldata = unpack(
">I8s8s8shI", read(34))
assert saved_oid == oid, (ofs, self.f.tell(), oid, saved_oid)
......@@ -456,7 +457,8 @@ class ClientCache(object):
self.f.seek(ofs)
read = self.f.read
assert read(1) == 'a', (ofs, self.f.tell(), oid, before_tid)
status = read(1)
assert status == 'a', (ofs, self.f.tell(), oid, before_tid)
size, saved_oid, saved_tid, end_tid, lver, ldata = unpack(
">I8s8s8shI", read(34))
assert saved_oid == oid, (ofs, self.f.tell(), oid, saved_oid)
......@@ -490,7 +492,8 @@ class ClientCache(object):
return None
self.f.seek(ofs)
read = self.f.read
assert self.f.read(1) == 'a', (ofs, self.f.tell(), oid)
status = read(1)
assert status == 'a', (ofs, self.f.tell(), oid)
size, saved_oid, saved_tid, end_tid, lver, ldata = unpack(
">I8s8s8shI", read(34))
assert saved_oid == oid, (ofs, self.f.tell(), oid, saved_oid)
......@@ -525,7 +528,8 @@ class ClientCache(object):
if ofs:
seek(ofs)
read = self.f.read
assert read(1) == 'a', (ofs, self.f.tell(), oid)
status = read(1)
assert status == 'a', (ofs, self.f.tell(), oid)
size, saved_oid, saved_tid, end_tid = unpack(
">I8s8s8s", read(28))
assert saved_oid == oid, (ofs, self.f.tell(), oid, saved_oid)
......@@ -644,7 +648,8 @@ class ClientCache(object):
self.f.seek(ofs)
read = self.f.read
assert read(1) == 'a', (ofs, self.f.tell(), oid)
status = read(1)
assert status == 'a', (ofs, self.f.tell(), oid)
size, saved_oid, saved_tid, end_tid, lver = unpack(
">I8s8s8sh", read(30))
assert saved_oid == oid, (ofs, self.f.tell(), oid, saved_oid)
......@@ -680,7 +685,8 @@ class ClientCache(object):
self._lock.acquire()
try:
seek(ofs)
assert read(1) == 'a', (ofs, self.f.tell(), oid)
status = read(1)
assert status == 'a', (ofs, self.f.tell(), oid)
size, saved_oid, tid, end_tid, lver = unpack(
">I8s8s8sh", read(30))
assert saved_oid == oid, (ofs, self.f.tell(), oid, saved_oid)
......
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