[ZODB-Dev] ZODB 3.9.3 history call causing problems for storages that still accept version parameters

Chris Withers chris at simplistix.co.uk
Thu Nov 19 17:55:40 EST 2009


Jim Fulton wrote:
> What's wrong with the original idea of having the server pass the size
> as a keyword parameter? The ZEO protocol is irrelevant.

Okay, from the top:

>> So, a ZODB 3.9.3 ClientStorage calls the ServerStub's history method, this
>> does an rpc call:
>>
>> self.rpc.call('history', oid, length)
>>
>> Which comes in on the server and gets despatched straight out in:
>>
>> /ZEO/zrpc/connection.py", line 581, in handle_request

...which ends up calling .history(oid,length) on zeoraid on RAIDStorage 
which is implemented as follows:

     def history(self, oid, version='', size=1):
         """Return a sequence of history information dictionaries."""
         assert version is ''
         return self._apply_single_storage('history', (oid, size))[0]

...because it's designed to work with ZODB 3.8 and 3.9, but doesn't 
support versions.

We can't use the trick of making the Z308-->Z309 adapter pass the size 
as a keyword parameter, because the call in this case is actually in 
ZODB 3.9's ClientStorage, so the adapter is never used, because all 
components involved are speaking Z309.

We also can't change the ClientStorage call to pass the size as a 
keyword parameter because ZEO's rpc doesn't appear to support keyword 
parameters.

That leaves the ideas I posted in my last reply...

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
            - http://www.simplistix.co.uk


More information about the ZODB-Dev mailing list