Re: [ZODB-Dev] Getting rid of ZODB versions (was Re: [ZWeb] Are Versions evil?)
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...
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.
In either case, if you have resource contention, you are probably out of luck.
Luck is not a binary concept ;-) Our current most essential use case for "Version"s is reindexing large catalogs. Reindexing can take hours. It is bad when the reindexing fails due to a write conflict. It is much more acceptable when an intervening occational catalog update fails with a "VersionLockError". -- Dieter
On Fri, Jul 16, 2004 at 08:39:52PM +0200, Dieter Maurer wrote:
In either case, if you have resource contention, you are probably out of luck.
Luck is not a binary concept ;-)
Our current most essential use case for "Version"s is reindexing large catalogs. Reindexing can take hours. It is bad when the reindexing fails due to a write conflict. It is much more acceptable when an intervening occational catalog update fails with a "VersionLockError".
I am so happy Dieter happens to come up with a perfect Zope-compatible use-case to justify this. This is *so* true for any application that isn't a Web application. When you have long-running transactions with lots of objects being modified, it is certainly better to deny access to someone else up-front ("This resource is unavailable. Go get some coffee.") than to let this person start and then have them either conflict at the end or have *you* conflict at the end. Yes, it's not something to be used as a rule, but for certain operations it is just *so* essential. Take care, -- Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 3361 2331
participants (2)
-
Christian Robottom Reis -
Dieter Maurer