[ZODB-Dev] ClientCache OID length

Shane Hathaway shane at zope.com
Mon Jun 9 11:02:54 EDT 2003


I spent some time making the ZEO client cache compatible with OIDs of 
variable length.  In shane-oid-length-branch, caches now put OIDs in a 
field of variable length.  All of the unit tests pass.

It was a little more difficult than I expected, since the byte offsets 
of the various fields stored in the cache are hard-coded.  To minimize 
the risk of making an arithmetic error, I added some pad bytes so that 
all of the fields except for the OID field stay at the original offset. 
  The net effect is that at least 6 and at most 8 bytes are wasted per 
cached object.  Does this bother anyone?  It doesn't bother me. 
Besides, those 6 bytes might be useful for something someday.

Should I merge the branch to the HEAD?  Ape needs it.

Shane





More information about the ZODB-Dev mailing list