• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: EO not getting saved
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EO not getting saved


  • Subject: Re: EO not getting saved
  • From: Chuck Hill <email@hidden>
  • Date: Fri, 29 May 2009 16:10:11 -0700


On May 29, 2009, at 2:25 PM, Timo Hoepfner wrote:

Thanks for your help Chuck,

Been there...

Glad to hear I'm not dreaming this.

Oh, it gets worse. Schroedinger's Cat. Logging out some debug information (currentSnapshot and committedSnapshot come to mind) can make the problem go away! Of course, once you are satisfied that you have fixed the problem and remove the debug statements, it comes back.



I have seen this in these cases:
1. Use of unlocked editing context

see below

2. Use of mutable attributes

I'm 100% certain this is not the case.

3. Faults firing during saveChanges (while processing deletes in particular)

Everything happens in one EC. The order shouldn't be a fault at this point,

It does not need to be the order. It can be any object that is touched during the save process.



as the order was created and saved in it already. But nevertheless, my stomack says, this is the route to follow. I keep the session alife indefinitely using ERXJSLifebeat, and I'm under the impression the problem happens more often after either app-startup or a long period of idle time. Maybe something getting garbage collected/ invalidated after a while?

That is possible, but I have no recollection of running into these sorts of problems. It is certainly something to be suspicious of.





Is there any chance that autolocking is turned off for ERXEC?

I'm pretty sure it's not, but I'll add more checks. The annoying part of the problem is, that it's so hard to reproduce.

Which means that it is caused by concurrency.


I've setup Selenium tests, creating 100 orders each, but none of the tests exhibits the problem.

You need to run these in parallel, preferrably on more than one machine and also reproduce the other system activity.



In production I get around 10 "bad orders" a day, while 50-300 orders work fine. This morning I could immedeately reproduce the problem 2 times in a row and already felt on the winning road, but after that, it took hors to get the next failure...

That is pretty much par for the course. Thinking about this some more, I think this is what is happening:


1. Order is changed
2. EC records snapshot and adds object to updated list
3. Notification is received, updated list is discarded (along with inserted and deleted)
4. saveChanges is called, and seeing nothing in the updated list, does nothing.




Thanks for your help. I owe you some gallons of beer at WOWODC. :)


No need, but you can help me drink some.  :-)

Chuck


-- Chuck Hill Senior Consultant / VP Development

Come to WOWODC'09 in San Fran this June!
http://www.wocommunity.org/wowodc09/

_______________________________________________
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


References: 
 >EO not getting saved (From: Timo Hoepfner <email@hidden>)
 >Re: EO not getting saved (From: Chuck Hill <email@hidden>)
 >Re: EO not getting saved (From: Timo Hoepfner <email@hidden>)

  • Prev by Date: Re: EO not getting saved
  • Next by Date: Re: EO not getting saved
  • Previous by thread: Re: EO not getting saved
  • Next by thread: Re: EO not getting saved
  • Index(es):
    • Date
    • Thread