Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Dev

zeo server conflict resolving

 

 

Zope dev RSS feed   Index | Next | Previous | View Threaded


mkrainer05 at gmail

Jun 2, 2006, 1:21 AM

Post #1 of 7 (1215 views)
Permalink
zeo server conflict resolving

Can someone please enlighten me on conflict resolving of the zeo server?

I'm getting occasional conflict errors from the zeo server.
The class I'm getting those conflict errors is a simple class
(only inheriting from Persistent) that defines a _p_resolveConflict()
method.

What I found out so far is, that in FileStorage.store() if
serial!=cached_tid then
tryToResolveConflict() gets called. In this method, in order to resolve the
conflict, find_globals tries to import the module where my class is defined.
Here's the problem. The zeo server has no information about my Products dir.
I added it to the PYTHONPATH variable in zeoctl before starting the server.
If I do a 'zeoctl show python' the Product dir shows up in the path, but
when
I log sys.path from within the find_globals() method it does NOT show up.

How can I teach the zeo server to lookup my Products dir to resolve the
conflict?


- Markus


stefan at epy

Jun 2, 2006, 2:14 AM

Post #2 of 7 (1171 views)
Permalink
Re: zeo server conflict resolving [In reply to]

You have to copy or symlink your Products directory into the ZEO
instance. At least those Products it tries to load for conflict
resolution.

HTH,
Stefan

On 2. Jun 2006, at 10:21, M. Krainer wrote:

> How can I teach the zeo server to lookup my Products dir to resolve
> the
> conflict?

--
Anything that happens, happens. --Douglas Adams


_______________________________________________
Zope-Dev maillist - Zope-Dev [at] zope
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


mkrainer05 at gmail

Jun 2, 2006, 3:27 AM

Post #3 of 7 (1170 views)
Permalink
Re: zeo server conflict resolving [In reply to]

Hi Stefan!

Forgot to mention that this was actually the first thing I tried. But it
doesen't work, as
the INSTANCE_HOME dir does also not show up in sys.path (in find_globals).

- Markus


On 6/2/06, Stefan H. Holek <stefan [at] epy> wrote:
>
> You have to copy or symlink your Products directory into the ZEO
> instance. At least those Products it tries to load for conflict
> resolution.
>
> HTH,
> Stefan
>
> On 2. Jun 2006, at 10:21, M. Krainer wrote:
>
> > How can I teach the zeo server to lookup my Products dir to resolve
> > the
> > conflict?
>
> --
> Anything that happens, happens. --Douglas Adams
>
>
>


dieter at handshake

Jun 3, 2006, 4:36 AM

Post #4 of 7 (1165 views)
Permalink
Re: zeo server conflict resolving [In reply to]

M. Krainer wrote at 2006-6-2 12:27 +0200:
>Forgot to mention that this was actually the first thing I tried. But it
>doesen't work, as
>the INSTANCE_HOME dir does also not show up in sys.path (in find_globals).

A ZEO weakness, I fixed in our local copy this way:

"runzeo.py":

# DM: 2004-06-03
# activate Zope's INSTANCE_HOME magic.
# This is necessary for conflict resolution of classes
# defined in "$INSTANCE_HOME/Products"
# Note that this is only a partial workaround. A complete solution
# would give ZEO the same Python path and product configuration options
# used by Zope. To get better control which classes are loaded
# an additional registration facility for such classes would
# be needed as well.
try: from App import FindHomes
except ImportError: pass # this is not Zope



--
Dieter
_______________________________________________
Zope-Dev maillist - Zope-Dev [at] zope
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


chris at simplistix

Jun 5, 2006, 6:54 AM

Post #5 of 7 (1155 views)
Permalink
Re: zeo server conflict resolving [In reply to]

Dieter Maurer wrote:
> M. Krainer wrote at 2006-6-2 12:27 +0200:
>> Forgot to mention that this was actually the first thing I tried. But it
>> doesen't work, as
>> the INSTANCE_HOME dir does also not show up in sys.path (in find_globals).
>
> A ZEO weakness, I fixed in our local copy this way:
>
> "runzeo.py":
>
> # DM: 2004-06-03
> # activate Zope's INSTANCE_HOME magic.

Have you signed your new contributor agreement yet? ;-)

Chris

--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
_______________________________________________
Zope-Dev maillist - Zope-Dev [at] zope
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


dieter at handshake

Jun 5, 2006, 12:00 PM

Post #6 of 7 (1159 views)
Permalink
Re: zeo server conflict resolving [In reply to]

Chris Withers wrote at 2006-6-5 14:54 +0100:
> ...
>Have you signed your new contributor agreement yet? ;-)

I did not yet get an invitation...



--
Dieter
_______________________________________________
Zope-Dev maillist - Zope-Dev [at] zope
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


mkrainer05 at gmail

Jun 6, 2006, 4:44 AM

Post #7 of 7 (1163 views)
Permalink
Re: zeo server conflict resolving [In reply to]

On 6/3/06, Dieter Maurer <dieter [at] handshake> wrote:
>
> A ZEO weakness, I fixed in our local copy this way:
>
> "runzeo.py":
>
> try: from App import FindHomes
> except ImportError: pass # this is not Zope



This works for me.
Thanks!

-- Markus

Zope dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.