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: Mike Schrag <email@hidden>
- Date: Thu, 25 Mar 2010 19:06:35 -0400
> On 25.03.2010, at 20:44, Mike Schrag wrote:
>> it certainly seems fragile, but in practice, i think it's right ... any time you register a new snapshot, it would push into the fast hash (and reset the value). any time you fast hash remove, it would remove the backing snapshot also.
>
> No, that's what it doesn't. It removes the value, but it doesn't check that that value actually belonged to the key it was asked to remove. It needs to check for _lastGID == gid before doing that _lastRec = null. Effectively what it does at the moment, when you tell it to remove gid, it also temporarily removes _lastGID.
ahh i see what you're saying. yeah you're right. definitely a loose contract :) like you mentioned, EODatabase is "good" about this internally, and given that it's both protected and underscored and not documented, I'd definitely put this one in the category of "you shouldn't be messing" :) really sketchy impl, though, I agree. Easily fixed, at least.
ms
_______________________________________________
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