Re: [ZODB-Dev] ZODB 3.9.3 history call causing problems for storages that still accept version parameters
Christian Theune wrote: Traceback (most recent call last): File ZODB3-3.9.3-py2.6-linux-i686.egg/ZEO/zrpc/connection.py, line 581, in handle_request ret = meth(*args) File gocept.zeoraid-1.0b6-py2.6.egg/gocept/zeoraid/storage.py, line 219, in history assert version is '' There is no ZEOStorage instance involved in this as far as I can tell. What am I missing? Check the setup_delegation method: the history method is patched through directly so your traceback doesn't see the ZEOStorage anymore. OK, I've committed tests and patches to deal with this issue and the similar issue in ZEOStorage308Adapter on the 3.9 branch. Should I merge these changes to the trunk too? cheers, Chris -- Simplistix - Content Management, Batch Processing Python Consulting - http://www.simplistix.co.uk ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org https://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] ZODB 3.9.3 history call causing problems for storages that still accept version parameters
On Thu, Nov 19, 2009 at 5:38 PM, Chris Withers ch...@simplistix.co.uk wrote: Chris Withers wrote: Jim Fulton wrote: I'm fine with change the storage server to pass the history size argument as a keyword parameter. Okay, but where is the Z309 equivalent of ZEOStorage308Adapter's history method? Ug, the answer is much less pleasant :-( 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 This, of course, means we can't pull the keyword parameters trick, since ZEO's rpc doesn't support keyword parameters from what I saw... I'm not sure what to suggest here... What's wrong with the original idea of having the server pass the size as a keyword parameter? The ZEO protocol is irrelevant. (Unless it's relevent somehow in the guts of ZEORAID, in which case, I don't care. :) Jim -- Jim Fulton ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org https://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] ZODB 3.9.3 history call causing problems for storages that still accept version parameters
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 ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org https://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] ZODB 3.9.3 history call causing problems for storages that still accept version parameters
Jim Fulton wrote: So why not add a history method to ZEOStorage that passes size as a keyword argument? I don't know what ZEOStorage is... zrpc.connection.Connection appears to despatch direct to the storage, please correct me if I'm wrong. In this case, that's a RAIDStorage. It doesn't have any choice in what parameters its history method gets called with, that's controlled by the ClientStorage emitting the zrpc call... So I'm afraid I don't really understand what you're trying to suggest... Chris -- Simplistix - Content Management, Batch Processing Python Consulting - http://www.simplistix.co.uk ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org https://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] ZODB 3.9.3 history call causing problems for storages that still accept version parameters
On Thu, Nov 19, 2009 at 6:07 PM, Chris Withers ch...@simplistix.co.uk wrote: Jim Fulton wrote: So why not add a history method to ZEOStorage that passes size as a keyword argument? I don't know what ZEOStorage is... Then we shouldn't be having this conversation. Jim -- Jim Fulton ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org https://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] ZODB 3.9.3 history call causing problems for storages that still accept version parameters
Jim Fulton wrote: On Thu, Nov 19, 2009 at 6:07 PM, Chris Withers ch...@simplistix.co.uk wrote: Jim Fulton wrote: So why not add a history method to ZEOStorage that passes size as a keyword argument? I don't know what ZEOStorage is... Then we shouldn't be having this conversation. I'm working off this traceback: Traceback (most recent call last): File ZODB3-3.9.3-py2.6-linux-i686.egg/ZEO/zrpc/connection.py, line 581, in handle_request ret = meth(*args) File gocept.zeoraid-1.0b6-py2.6.egg/gocept/zeoraid/storage.py, line 219, in history assert version is '' There is no ZEOStorage instance involved in this as far as I can tell. What am I missing? Chris -- Simplistix - Content Management, Batch Processing Python Consulting - http://www.simplistix.co.uk ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org https://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] ZODB 3.9.3 history call causing problems for storages that still accept version parameters
On 11/20/2009 01:07 AM, Chris Withers wrote: Jim Fulton wrote: On Thu, Nov 19, 2009 at 6:07 PM, Chris Withersch...@simplistix.co.uk wrote: Jim Fulton wrote: So why not add a history method to ZEOStorage that passes size as a keyword argument? I don't know what ZEOStorage is... See StorageServer.py around line 80. As the docstring says it is a: Proxy to underlying storage for a single remote client. Then we shouldn't be having this conversation. I'm working off this traceback: Traceback (most recent call last): File ZODB3-3.9.3-py2.6-linux-i686.egg/ZEO/zrpc/connection.py, line 581, in handle_request ret = meth(*args) File gocept.zeoraid-1.0b6-py2.6.egg/gocept/zeoraid/storage.py, line 219, in history assert version is '' There is no ZEOStorage instance involved in this as far as I can tell. What am I missing? Check the setup_delegation method: the history method is patched through directly so your traceback doesn't see the ZEOStorage anymore. -- Christian Theune · c...@gocept.com gocept gmbh co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1 Zope and Plone consulting and development ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org https://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] ZODB 3.9.3 history call causing problems for storages that still accept version parameters
Christian Theune wrote: There's a size argument following the version which probably is not being passed as a keyword argument so it looks like a slight API incompatibility. I wonder whether ZEORaid should hack around that or whether the caller should be changed. Hmm... looking more closely at the traceback, the caller is: File ZODB3-3.9.3-py2.6-linux-i686.egg/ZEO/StorageServer.py, line 1382, in history return self.storage.history(oid, size) Now, ZODB 3.9 doesn't support versions, which is why the versions parameter has vanished, I guess? However, I wonder if maybe this call should be: self.storage.history(oid, size=size) ...to support storages which still accept a version parameter *and* newer ones that don't? Looking at RelStorage: http://svn.zope.org/relstorage/trunk/relstorage/storage.py?rev=105120view=auto ...I can see it's going to have the same problem. Would anyone object if I wrote a test and fixed this on the 3.9 branch of ZODB? I'm not really sure what to do about the trunk... Chris -- Simplistix - Content Management, Batch Processing Python Consulting - http://www.simplistix.co.uk ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org https://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] ZODB 3.9.3 history call causing problems for storages that still accept version parameters
On 11/02/2009 10:47 AM, Chris Withers wrote: Christian Theune wrote: There's a size argument following the version which probably is not being passed as a keyword argument so it looks like a slight API incompatibility. I wonder whether ZEORaid should hack around that or whether the caller should be changed. Hmm... looking more closely at the traceback, the caller is: File ZODB3-3.9.3-py2.6-linux-i686.egg/ZEO/StorageServer.py, line 1382, in history return self.storage.history(oid, size) Now, ZODB 3.9 doesn't support versions, which is why the versions parameter has vanished, I guess? However, I wonder if maybe this call should be: self.storage.history(oid, size=size) ...to support storages which still accept a version parameter *and* newer ones that don't? Looking at RelStorage: http://svn.zope.org/relstorage/trunk/relstorage/storage.py?rev=105120view=auto ...I can see it's going to have the same problem. Would anyone object if I wrote a test and fixed this on the 3.9 branch of ZODB? I'm not really sure what to do about the trunk... I think that's the best idea. It's not exactly part of the policy of supporting old protocols but if we want to support and encourage 3rd party storage implementations we should leverage this simple fix for better backwards compatibility. Christian -- Christian Theune · c...@gocept.com gocept gmbh co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1 Zope and Plone consulting and development ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org https://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] ZODB 3.9.3 history call causing problems for storages that still accept version parameters
Christian Theune wrote: Would anyone object if I wrote a test and fixed this on the 3.9 branch of ZODB? I'm not really sure what to do about the trunk... I think that's the best idea. It's not exactly part of the policy of supporting old protocols but if we want to support and encourage 3rd party storage implementations we should leverage this simple fix for better backwards compatibility. Hmmm, I'm less sure now. The problematic code is here: http://zope3.pov.lt/trac/browser/ZODB/branches/3.9/src/ZEO/StorageServer.py#L1379 It looks like ZEOStorage308Adapter is used when the protocol specified is less than Z309, which it is in my case. But, the assumption here is that the storage being served by StorageServer effectively matches the Z309 API. zeoraid's RAIDStorage does not... However, I can't see what `history` method is called if the protocol = Z309. Christian, I'm guessing you guys have used zeoraid with 3.9 from some time now, does this issue not occur if everything is talking Z309? If not, why not? Chris -- Simplistix - Content Management, Batch Processing Python Consulting - http://www.simplistix.co.uk ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org https://mail.zope.org/mailman/listinfo/zodb-dev
Re: [ZODB-Dev] ZODB 3.9.3 history call causing problems for storages that still accept version parameters
Jim Fulton wrote: I'm fine with change the storage server to pass the history size argument as a keyword parameter. Okay, but where is the Z309 equivalent of ZEOStorage308Adapter's history method? cheers, Chris -- Simplistix - Content Management, Batch Processing Python Consulting - http://www.simplistix.co.uk ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org https://mail.zope.org/mailman/listinfo/zodb-dev