Re: [ZODB-Dev] RelStorage zodbconvert, ConflictError on Zope2 startup

2011-07-19 Thread Shane Hathaway
On 07/18/2011 02:16 PM, Sean Upton wrote:
> On Fri, Jul 15, 2011 at 5:35 PM, Shane Hathaway  wro=
> te:
>> I am thinking of changing the memcache code to use a random per-database =
> key
>> prefix. =A0If I had done that already, you would not have run into this
>> problem, since clearing the database would cause RelStorage to use a new =
> key
>> prefix. =A0Your old memcache data would have been ignored.
>
> +1, and it sounds like by consequence of design, this would be
> necessarily backward compatible with existing installations of 1.5.0?

Yes, it should be fully compatible with existing installations.

Shane
___
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] RelStorage zodbconvert, ConflictError on Zope2 startup

2011-07-18 Thread Sean Upton
On Fri, Jul 15, 2011 at 5:35 PM, Shane Hathaway  wro=
te:
> I am thinking of changing the memcache code to use a random per-database =
key
> prefix. =A0If I had done that already, you would not have run into this
> problem, since clearing the database would cause RelStorage to use a new =
key
> prefix. =A0Your old memcache data would have been ignored.

+1, and it sounds like by consequence of design, this would be
necessarily backward compatible with existing installations of 1.5.0?

Thanks,
Sean
___
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] RelStorage zodbconvert, ConflictError on Zope2 startup

2011-07-15 Thread Shane Hathaway
On 07/14/2011 11:21 PM, Sean Upton wrote:
> On Thu, Jul 14, 2011 at 3:28 PM, Sean Upton  wrote:
 Full traceback: http://pastie.org/2214036
>> I am able to avoid this by commenting out cache-servers and
>> cache-module-name in my zope.conf.
>
> Looks like the ConflictError at start-up is self-inflicted: I never
> stopped memcached to purge it of traces of the old/previous relstorage
> database/instance I was running in my tests.  I was running
> zodbconvert with --clear, but not specifying use of memcached for
> zodbconvert destination storage ZConfig values, only for my zope2
> instance configurations.
>
> Lesson learned: purge memcached of any previous data via restart if
> you plan to replace an existing RelStorage storage with zodbconvert
> --clear.

This kind of thing has bitten a number of people.  When moving databases 
around, it's easy to forget to clear memcached, and the effects are 
always weird.

I am thinking of changing the memcache code to use a random per-database 
key prefix.  If I had done that already, you would not have run into 
this problem, since clearing the database would cause RelStorage to use 
a new key prefix.  Your old memcache data would have been ignored.

Shane
___
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] RelStorage zodbconvert, ConflictError on Zope2 startup

2011-07-14 Thread Sean Upton
On Thu, Jul 14, 2011 at 3:28 PM, Sean Upton  wrote:
>>> Full traceback: http://pastie.org/2214036
> I am able to avoid this by commenting out cache-servers and
> cache-module-name in my zope.conf.

Looks like the ConflictError at start-up is self-inflicted: I never
stopped memcached to purge it of traces of the old/previous relstorage
database/instance I was running in my tests.  I was running
zodbconvert with --clear, but not specifying use of memcached for
zodbconvert destination storage ZConfig values, only for my zope2
instance configurations.

Lesson learned: purge memcached of any previous data via restart if
you plan to replace an existing RelStorage storage with zodbconvert
--clear.

Sean
___
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] RelStorage zodbconvert, ConflictError on Zope2 startup

2011-07-14 Thread Sean Upton
On Thu, Jul 14, 2011 at 1:43 PM, Hanno Schlichting  wrote:
> On Thu, Jul 14, 2011 at 9:32 PM, Sean Upton  wrote:
>> Full traceback: http://pastie.org/2214036
> That's weird, you are getting a conflict error on inserting the root
> application object (oid 0x00).

I am able to avoid this by commenting out cache-servers and
cache-module-name in my zope.conf.  I am now looking at how memcached
integration seems to break for me (memcached is running on a unix
socket with correct file permissions; I am using cache-servers in
zope.conf, and I am not in my config file for zodbconvert).

Sean
___
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] RelStorage zodbconvert, ConflictError on Zope2 startup

2011-07-14 Thread Hanno Schlichting
On Thu, Jul 14, 2011 at 9:32 PM, Sean Upton  wrote:
> ZODB.POSException.ConflictError: database conflict error (oid 0x00,
> class persistent.mapping.PersistentMapping, serial this txn started
> with 0x038fa89e48c295cc 2011-07-13 14:22:17.053148, serial currently
> committed 0x038b077ae26bec77 2010-12-19 21:46:53.067557)
>
> Full traceback: http://pastie.org/2214036
>
> Any ideas on what I'm doing wrong or what's going on?  Where should I
> look into the RelStorage tables for clues?

That's weird, you are getting a conflict error on inserting the root
application object (oid 0x00).

So for some reason the startup code cannot load the existing root
object, thinks the database is empty and tries to start fresh. I'm not
sure how that could happen, unless the ZODB connection strings are
wrong or database permissions not quite right.

Hanno
___
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


[ZODB-Dev] RelStorage zodbconvert, ConflictError on Zope2 startup

2011-07-14 Thread Sean Upton
I'm a bit stumped with a problem with zodbconvert from RelStorage
1.5.0 (ZODB 3.9.5, Plone 4.0, Zope2 2.2.19).

I get ConflictError on Zope2 startup on a just-converted ZODB.   I
tried converting with blobs and without; from FileStorage and from
ClientStorage sources of the same database -- all to the same end when
I try to use it.  Has anyone seen anything like this at Zope2 startup?

ZODB.POSException.ConflictError: database conflict error (oid 0x00,
class persistent.mapping.PersistentMapping, serial this txn started
with 0x038fa89e48c295cc 2011-07-13 14:22:17.053148, serial currently
committed 0x038b077ae26bec77 2010-12-19 21:46:53.067557)

Full traceback: http://pastie.org/2214036

Any ideas on what I'm doing wrong or what's going on?  Where should I
look into the RelStorage tables for clues?

Thanks,
Sean

sdup...@gmail.com | sean.up...@hsc.utah.edu
___
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