Re: Snapshots mysteriously vanishing?
Re: Snapshots mysteriously vanishing?
- Subject: Re: Snapshots mysteriously vanishing?
- From: Mike Schrag <email@hidden>
- Date: Thu, 25 Mar 2010 16:38:27 -0400
I don't have a patch you can easily apply. The workaround on your side is to not let the EO in the parent EC garbage collect (basically, keep a reference to the parent EO around for any EO that you fault into child EC). There's not an easy recovery from this -- you have to toss your EC stack ... or .. maybe you could refetch the snapshot underneath it, but i think you're probably left with a __retainCount of -1 at that point, so probably even that won't help you.
I think this could be fixed pretty easily in wonder by overriding ERXGenericRecord.__setRetainCount .. When count is set >0, call back to your EC and retain the object in a dict and when it drops to 0, release that ref.
On Mar 25, 2010, at 4:25 PM, Brook, James wrote:
> Mike,
>
> That sounds all too familiar to me. We are experiencing errors just like that. We have a feature that creates nested editing contexts several levels deep and fetches EOs all the way down to the bottom. Do you know of a workaround, patch or some way to recover from the bug you mention? I seem to remember a similar bug years ago in the days when EOF kept strong references. We are using Wonder.
>
> Sorry for selfishly jumping in. Disappearing snapshots are causing us lots of pain because whole instances of our application become useless.
>
> --
> James
> ________________________________________
> From: webobjects-dev-bounces+jbrook=email@hidden [webobjects-dev-bounces+jbrook=email@hidden] On Behalf Of Mike Schrag [email@hidden]
> Sent: 25 March 2010 20:20
> To: Marc Guenther
> Cc: email@hidden
> Subject: Re: Snapshots mysteriously vanishing?
>
>>> by any chance was this an EO in a parent editing context that also existed in a child editingcontext?
>>
>> I don't think so, but I'm not sure. That particular EO could have been in all differents ECs at the time, as it's entity is used all over the place.
>>
>> Do you have anything specific in mind?
> yeah, there's a bug with refcounting of eo's in child ec's if the parent ec copy of the EO gets garbage collected ... the result of this bug is disappearing snapshots. this specifically applies to eo's fetched into a child that were already fetched into the parent, though, not to peer ec's.
>
> 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
_______________________________________________
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