[ZODB-Dev] RelStorage zodbconvert, ConflictError on Zope2 startup
Shane Hathaway
shane at hathawaymix.org
Fri Jul 15 19:35:55 EDT 2011
On 07/14/2011 11:21 PM, Sean Upton wrote:
> On Thu, Jul 14, 2011 at 3:28 PM, Sean Upton<sdupton at gmail.com> 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
More information about the ZODB-Dev
mailing list