Re: Bug in WO5.4.3? (was: Snapshots mysteriously vanishing?)
Re: Bug in WO5.4.3? (was: Snapshots mysteriously vanishing?)
- Subject: Re: Bug in WO5.4.3? (was: Snapshots mysteriously vanishing?)
- From: Johann Werner <email@hidden>
- Date: Fri, 26 Mar 2010 08:12:41 +0100
Am 25.03.2010 um 20:25 schrieb Marc Guenther:
> I just digged around in EODatabase, and found the following graphic.
>
> This is basically a wrapper around the _snapshots dictionary, which caches the last accessed key/value for speed reasons.
>
> But the _fastHashRemove() method seems to be wrong. It doesn't set _lastGID to null. This means, I could insert(valueA, keyA), then remove(keyB) and then get(keyA) would return null instead of valueA?
That's something I can observe from time to time in my apps where I get errors like
java.lang.IllegalStateException: rowDiffsForAttributes: snapshot in com.webobjects.eoaccess.EODatabaseOperation {_dbSnapshot = {}; _entity = <snip> _databaseOperator = "EODatabaseUpdateOperator"; } does not contain value for attribute named catalogID with snapshot key: catalogID
though all other values are present just that one 'catalogID' does not appear anymore. I never found why this happens but your explanation could fit that situation well.
jw
>
> What am I missing here? In EODatabase, a remove() is always called after a get() of the same key, which is the only scenario tgat works. Still, sounds dangerous to me, just to save a single assignment, and these messages are protected not private.
>
> Anyway, this is not my original problem, as the missing snapshot really was missing from the _snapshots dictionary.
>
> Marc
> <EODatabase.png>
>
>
> On 25.03.2010, at 18:24, Marc Guenther wrote:
>
>> Hi,
>>
>> we have switched to WO 5.4.3 (from 5.2.3) several months ago. And since that time, we sporadically experience strange exceptions, mostly NullPointerExceptions deep within EOF, most of which could be traced back to a snapshot mysteriously vanishing.
>>
>> I had this in the debugger once, and drilled down to all the snapshots in the EODatabase, and there was one entry missing. Interestingly, this was from an entity which is readonly and cached, and also that entry had to have been there before, otherwise the app wouldn't have gotten to the point where it failed. I checked the DB and the value was there. It is from a table which is only used for lookup and never changes.
>>
>> This also happened with other snapshots of regular entitites, and we have never really been able to reproduce it reliably. It seems to happen when lots of ECs are involved, but that's only an assumption.
>>
>> Has anyone ever seen something like this? Can this be related to the WO 5.4.3 switch? I remember some talk about open bugs in 5.4.3, but haven't been able to find anything substantial about it.
>>
>> Btw, no WOnder (yet, sniff)
>>
>> Thanks,
>> Marc
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden