[Zope-CMF] Replication And Workflows - "Nightmare of CMF Stre et"
Norfleet, Sheppard S.
sheppard.norfleet at ngc.com
Fri Sep 26 10:50:33 EDT 2003
Dietur,
Great tip!!!
I didn't know about the begin() method, but yeah I am doing a commit on end
and it seems to have been working ok. I will put begin() in right away,
awesome!
Thanks again,
Shep
-----Original Message-----
From: Dieter Maurer [mailto:dieter at handshake.de]
Sent: Thursday, September 25, 2003 1:14 PM
To: Norfleet, Sheppard S.
Cc: 'zope-cmf at zope.org'
Subject: RE: [Zope-CMF] Replication And Workflows - "Nightmare of CMF
Stre et"
Norfleet, Sheppard S. wrote at 2003-9-25 08:34 -0700:
> ...
> > * I think Shane has a DCWorkflow variant that stores workflow
> > state outside the object.
> >
> > Should you by chance use this variant?
>
> Yes I do use DCWorkflow, but I previously reviewed the code and my
> impression was that it was for the workflow content items, not the
workflow
> tool, and its the workflow tool that seems to manage the workflow_history
> attribute. I see where DCWorkflow makes calls to the WorkflowTool
whenever
> it needs state/history information. So if my impressions are right how
can
> it be managing the workflow_history outside of the object? I will look
over
> the code again...
You can quit this route.
Apparently, you do not have this special variant.
> > * You mention separate threads.
> >
> > Are you aware that a separate thread can easily read stale
> > data unless it plays well with the ZODB transaction
> > machinery?
> >
> > Invalidation messages (caused by modification of objects)
> > are only handled at transaction boundaries.
> > Unless your separate thread commit/aborts the transaction
> > it is highly likely that it sees stale object state.
>
> Yes, I defined a _p_independant function and bracketed transactions with
> synchronization locks and have gotten rid of the ZODB conflict errors
that
> plagued me for a long while. I also refresh the DB connection on each
pass
> by the replication thread in the hopes that it might combat stale data,
but
> thats simply the tactics of a novice's mind.
And you have "get_transaction().begin()" at the start of the pass
and "get_transaction().commit()" or "...abort()" at its end?
Dieter
More information about the Zope-CMF
mailing list