[ZODB-Dev] Getting rid of ZODB versions (was Re: [ZWeb] Are Versions evil?)

Jeremy Hylton jhylton at gmail.com
Fri Jul 16 16:04:54 EDT 2004


On Fri, 16 Jul 2004 20:39:52 +0200, Dieter Maurer <dieter at handshake.de> wrote:
> Jim Fulton wrote at 2004-7-15 17:18 -0400:
> >Dieter Maurer wrote:
> >I don't think anyone find versions useful in cases where
> >locks matter.  With versions, if you get resource contention,
> >someone loses.
> 
> Yes, but hopefully the short running (inexpensive) and not the long running
> (expensive) process...

In particular, you can use versions to have some application-level
control over who wins and who loses.  If you want a transaction to
win, you run it in a version.

> >Long-running subtransactions as I'm proposing would rely on mult-version
> >concurrency control, rather than locks.
> 
> MVCC is nice (we already use it) but its help for write
> contention is limited. The locks used by the current "Version"s
> are better suited for long running transactions.

Right. (Write!)
 
Perhaps we can come up with a less expensive implementation for the
same idea.  Versions make the implementation of storages a lot more
complex.  It would be great to preserve the feature but provide a
simpler implementation in the core.  For example, savepoints seems to
offer a much cleaner implementation than subtransactions.

On the other hand, now that we're back to having just one core storage
(plus ZEO) versions may not be an enormous cost.  Of course, that's
easy for me to say now that I don't have to pay it ;-).

Jeremy


More information about the ZODB-Dev mailing list