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

Jim Fulton jim at zope.com
Thu Nov 19 17:59:41 EST 2009


On Thu, Nov 19, 2009 at 5:55 PM, Chris Withers <chris at simplistix.co.uk> wrote:
> 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.

So why not add a history method to ZEOStorage that passes size as a
keyword argument?

Jim

-- 
Jim Fulton


More information about the ZODB-Dev mailing list