[Zope3-checkins] CVS: ZODB4/src/zodb/zeo - cache.py:1.6

Jeremy Hylton jeremy@zope.com
Fri, 20 Jun 2003 13:04:52 -0400


Update of /cvs-repository/ZODB4/src/zodb/zeo
In directory cvs.zope.org:/tmp/cvs-serv3297

Modified Files:
	cache.py 
Log Message:
Apparent fix for bug seen once in hours of testing.

If vlen was non-zero, then _copytocurrent() failed because it expected
the caller to also pass vheader.


=== ZODB4/src/zodb/zeo/cache.py 1.5 => 1.6 ===
--- ZODB4/src/zodb/zeo/cache.py:1.5	Thu Jun 19 17:41:08 2003
+++ ZODB4/src/zodb/zeo/cache.py	Fri Jun 20 13:04:52 2003
@@ -374,7 +374,9 @@
                     data = read(dlen)
                     self._trace(0x2A, oid, version, h[19:], dlen)
                     if (p < 0) != self._current:
-                        self._copytocurrent(ap, tlen, dlen, vlen, h, oid, data)
+                        # if vlen and not version, then we don't copy
+                        # the version data to the new file.
+                        self._copytocurrent(ap, tlen, dlen, 0, h, oid, data)
                     return data, h[19:]
                 else:
                     self._trace(0x26, oid, version)