Re: ZopePublication Competing writes/reads, database conflict error

Vladislav Vorobiev <[email protected]> Mon, 23 Apr 2012 19:39:58 +0200
Newsgroups gmane.comp.web.zope.german
Message-ID <CADmZVq98fBtGaepo2Etatq9JXz-342cdbPNC-+uLFpyfun_X1g@mail.gmail.com>
> Warum verwendest Du keinen Counter anstatt mühselig keys() zu befragen?

Weiss nicht, wusste nichts fom Counter.
Counter aus collections?  Meinst etwa so?

a=Counter(self.images)
a.__len__()


> Am 23. April 2012 09:52 schrieb Vladislav Vorobiev
> <[email protected]>:
>>
>> Hi,
>>
>> In einem BTreeContainer "images".
>>
>> erstelle ich in einer größeren Transaktion viele viele Objekte.
>>
>> etwa so
>>
>> for i in range(0,100000000):
>>  self['images'][i]=myObj()
>>
>> wenn ich während der Erstell-Transaktion im "images" container etwas
>> zähle(lese) z.B. so
>>
>> len(self.keys())
>>
>> bekomme ich am ende der Erstell-schleife und es gibt ein Roll-Back
>>
>> 2012-04-23T11:12:10 WARNING ZopePublication Competing writes/reads
>> database conflict error (oid 0x07d3, class myclass)
>>
>> Wie kommt es zur diesem Konflikt? Ich lese ja nur. Kann man das
>> verhalten irgend wie abstellen?
>>
>> Ich dachte solche read/write Konflikte gehören der Vergangenheit an.
>>
>> ZODB3-3.10.5-py2.7-linux-x86_64.egg
>>
>> Danke
>> Vlad
>>
>>
>> _______________________________________________
>> zope mailing list
>> [email protected]
>> https://mail.dzug.org/mailman/listinfo/zope
>
>
>
>
>
> _______________________________________________
> zope mailing list
> [email protected]
> https://mail.dzug.org/mailman/listinfo/zope
>



-- 
Best Regards
Vlad Vorobiev


_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope