Re: failed to find a snapshot for EO with Global ID
Re: failed to find a snapshot for EO with Global ID
- Subject: Re: failed to find a snapshot for EO with Global ID
- From: Ramsey Gurley <email@hidden>
- Date: Fri, 15 Jun 2012 17:20:14 -0700
On Jun 14, 2012, at 3:24 PM, Mike Schrag wrote:
>> So it would seem that the nested ECs are sneaking past this fix and causing havoc. I'm still not sure what about garbage collection triggers this, but I've updated ERXEC so that nested ECs check to see if any of its parents are saving before processing notifications. The test passes with that change in place.
> The GC + child editing context thing sounds like a problem we ran into a couple years ago ... From my notes:
>
> "The essence of the problem is that EO's track retain count as an ivar. This retain count records how many nested ec's contain that EO as well, because they share a snapshot (with refcount = 1). If, however, the parent EO gets garbage collected while the nested EC version of it is still alive, the parent EO's retain count disappears and it throws off the snapshot ref counting.
>
> We talked about this and bounced around a couple ideas, but ultimately the one that seemed to have the least side-effects was to track the retain count in the EC rather than the EO. This patch provides an impl of that concept -- retain count is now removed from EO and pushed up into a dictionary in the EC. Now even if the underlying EO gets GC'd, the retain counts won't be lost."
>
> ms
Looks like I'll need to investigate this further. My fix doesn't cover all the snapshot issues we are having :-/ After a quiet Thursday, we got a few today. Finding a way to reproduce these errors is difficult.
Ramsey
_______________________________________________
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