[ZODB-Dev] Re: [Zope-dev] Re: [Bug] ZODB invalidation processing

2007-06-01 Thread Joachim Schmitz
one very important finding: tryToResolveConflict fails in the resolve function resolve built-in method _p_resolveConflict of BTrees._IOBTree.IOBucket object at 0xb1ab82b4 by raising an exception, when I call it again from the debugger I get. (Pdb) resolved = resolve(old, committed,

[ZODB-Dev] Re: [Bug] ZODB invalidation processing

2007-06-01 Thread Joachim Schmitz
Tres Seaver schrieb: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Not if the sessions being used are from 'faster' -- it doesn't use IOBTree. The major application use of that module is in the catalog. you correct see below: Try dumping out the contents of the bucket: for k, v in

Re: [ZODB-Dev] Concurrent transactions

2007-06-01 Thread Stefan H. Holek
Counting in the ZODB is more or less a no-go. You will get write conflicts, and your ZODB will grow (too) quickly. That said, you may want to look at BTrees.Length for a counter with built-in conflict resolution. Stefan On 1. Jun 2007, at 09:47, Kai Diefenbach wrote: After reading some

[ZODB-Dev] Re: Concurrent transactions

2007-06-01 Thread Kai Diefenbach
Christian Theune [EMAIL PROTECTED] wrote: Am Freitag, den 01.06.2007, 09:47 +0200 schrieb Kai Diefenbach: A gets counter = 5 B gets counter (before A writes the increased counter) = 5 A increases and writes the counter = 6 B increases and writes the counter = 6 (*) *) In my

[ZODB-Dev] Re: Concurrent transactions

2007-06-01 Thread Kai Diefenbach
Stefan H. Holek [EMAIL PROTECTED] wrote: Counting in the ZODB is more or less a no-go. You will get write conflicts, and your ZODB will grow (too) quickly. But what's an alternative? In general I don't like the thought to use a RDBMS in parallel to Zope's ZODB approach. And more than ever

Re: [ZODB-Dev] Todo: Zope support for Slots and Decorators?

2007-06-01 Thread Jim Fulton
On May 31, 2007, at 6:13 PM, Chris Spencer wrote: A couple questions. Does ZODB support classes using __slots__? Much to my surprise, it seems to. I just tried it and it worked just fine. :) Also, are there any problems with using decorators with ZODB? Not that I'm aware of. There is

[ZODB-Dev] Re: [Bug] ZODB invalidation processing

2007-06-01 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Joachim Schmitz wrote: Tres Seaver schrieb: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Not if the sessions being used are from 'faster' -- it doesn't use IOBTree. The major application use of that module is in the catalog. you correct see

Re: [ZODB-Dev] Re: Concurrent transactions

2007-06-01 Thread Jim Fulton
On Jun 1, 2007, at 6:07 AM, Kai Diefenbach wrote: Stefan H. Holek [EMAIL PROTECTED] wrote: Counting in the ZODB is more or less a no-go. You will get write conflicts, and your ZODB will grow (too) quickly. I kind of doubt that updating a little counter will make the database grow too

Re: [ZODB-Dev] Re: [Zope-dev] Re: [Bug] ZODB invalidation processing

2007-06-01 Thread Joachim Schmitz
some more findings: 1. The conflict error really happens on the Portalcatalog 2. It is a BTreesConflictError: BTrees conflict error at -1/47/47: Conflicting inserts which disguised as ConflictError, through the various try: excepts: 3. It happens on DateIndexes like created and modified. 4.

[ZODB-Dev] Re: [Bug] ZODB invalidation processing

2007-06-01 Thread Joachim Schmitz
Tres Seaver schrieb: BTrees._IOBTree.IOBTree object at 0xb562fadc DateIndex at created Products.ZCatalog.Catalog.Catalog object at 0xb12d622c CatalogTool at portal_catalog CPSDefaultSite at uniben Application at {'Application': Application at , 'ZGlobals': BTrees._OOBTree.OOBTree object at

[ZODB-Dev] Re: [Zope-dev] Re: [Bug] ZODB invalidation processing

2007-06-01 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Joachim Schmitz wrote: some more findings: 1. The conflict error really happens on the Portalcatalog 2. It is a BTreesConflictError: BTrees conflict error at -1/47/47: Conflicting inserts which disguised as ConflictError, through the various

Re: [ZODB-Dev] Concurrent transactions

2007-06-01 Thread Benji York
Kai Diefenbach wrote: Within an adapter I increase a counter (e.g. for every download of an file) by doing: self.counter[0] += 1 self.counter is a PersistentList stored as annotation. Note that if you use a PersistentList, then the entire list must be written to the

[ZODB-Dev] Re: [Bug] ZODB invalidation processing

2007-06-01 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Joachim Schmitz wrote: Tres Seaver schrieb: BTrees._IOBTree.IOBTree object at 0xb562fadc DateIndex at created Products.ZCatalog.Catalog.Catalog object at 0xb12d622c CatalogTool at portal_catalog CPSDefaultSite at uniben Application at

[ZODB-Dev] Re: Concurrent transactions

2007-06-01 Thread Kai Diefenbach
Jim Fulton [EMAIL PROTECTED] wrote: On Jun 1, 2007, at 6:07 AM, Kai Diefenbach wrote: Stefan H. Holek [EMAIL PROTECTED] wrote: Counting in the ZODB is more or less a no-go. You will get write conflicts, and your ZODB will grow (too) quickly. I kind of doubt that updating a little

Re: [ZODB-Dev] Todo: Zope support for Slots and Decorators?

2007-06-01 Thread Tim Peters
[Chris Spencer] A couple questions. Does ZODB support classes using __slots__? [Jim Fulton] Much to my surprise, it seems to. I just tried it and it worked just fine. :) FYI, this is intentional :-), and was part of the changes to make ZODB play nicely with Python's new-style classes. It

[ZODB-Dev] Re: [Bug] ZODB invalidation processing

2007-06-01 Thread Jürgen Kartnaller
We also run into this kind of problems. The only save way to solve it was to serialize our index updates. We do this by using one zope instance which runs only a lovely.remotetask task service. This service contains an indexing task. When indexing is needed we just create a new indexing job

[ZODB-Dev] Re: [Bug] ZODB invalidation processing

2007-06-01 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jürgen Kartnaller wrote: We also run into this kind of problems. The only save way to solve it was to serialize our index updates. We do this by using one zope instance which runs only a lovely.remotetask task service. This service contains

[ZODB-Dev] Re: [Bug] ZODB invalidation processing

2007-06-01 Thread Jürgen Kartnaller
Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jürgen Kartnaller wrote: We also run into this kind of problems. The only save way to solve it was to serialize our index updates. We do this by using one zope instance which runs only a lovely.remotetask task service. This