---------- Forwarded message ---------- From: Igor Stasenko siguctua@gmail.com Date: 25 Sep 2007 19:29 Subject: Re: [ANN] Magma 1.0r40 To: florian.minjat@emn.fr
I'm placed a line in removeGarbageCollectedObjectEntries Transcript show: 'Oids count: ' , self oidCount asString; cr. And during running Florian's update it shows (between other lines): Oids count: 29923 Oids count: 45449 Oids count: 49919 Oids count: 66399 Oids count: 76492 So its growing and growing.. And only way to get rid of dead keys, is to call MaOidManager>>finalizeOids. But i can't find any places, leading to call of this method. Is this designed to be managed by user directly, using MagmaSession>>finalizeOids ? I think it should call finalizeValues to dicts in removeGarbageCollectedObjectEntries, so both dicts with object>id and id>object associations will be cleaned and rehashed.
Or, maybe, since magma uses own version(s) of weakIdentityKey dicts, implementation of #at:put: in weakIdentityKey dict can be changed to silently reuse entries with key=nil. So there will be much less need for rehashing.
And it seems i was wrong saying that weak finalization process can interfere with oid manager weak dicts. Since oid manager never register own dicts to finalization registry it should not because of it. But then i wonder, why with big pauses putted in #reject: (or not using #reject: , as in new case) helped to avoid errors? The only way how oid can be lost, its, for instance, i adding new oid to dict and then using it somewhere, while at same time in other (background) process dict is being rehashing and/or manipulating in other ways, and after rehashing new entries is lost because they putted into place, which was already scanned by copying loop which moves associations from old array to new one.
Interesting, how well magma handles following code: session commit: [ [ big long huge loop ] fork. [ big long huge loop 2 ] fork. ... ]. Is it allows to spawn different processes in commit? I think, Florian you should check if your code does not contain such things, or maybe you using code, which leads to them..
I now trying to run update with all methods in MagmaOidManager enclosed by mutex.