• 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: I don't get it.(was delete statement)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I don't get it.(was delete statement)


  • Subject: Re: I don't get it.(was delete statement)
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 5 Apr 2007 09:41:59 -0700


On Apr 5, 2007, at 9:39 AM, Frank Stock wrote:

Ken,


I was to early with my conclusing, there are 'updates' again, only it takes a much longer time now. I will try with 1 instance first and see what I get.

That just means that there is still someplace in your code where you are not locking correctly. Run with logging enabled for NSLog.DebugGroupMultithreading. That should give you stack traces of where the problem lies.


Chuck



Op 5-apr-07, om 17:10 heeft Ken Anderson het volgende geschreven:

Frank,

On Apr 5, 2007, at 10:49 AM, Frank Stock wrote:

Ken,


Our client uses 1 instances where we directly connect to and we get this error:
Encountered a newly inserted EO with an owns destination relationship but no snapshot.

These types of errors are usually in response to abuse of EOF. It sounds to me like you might be setting an EO from one editing context as a relationship to another. It's critical that you always lock the context (not just for saving - for ANY operation) and that you make sure you're not crossing objects in different editing contexts.



I am currently testing our application to work with more instances, I can't repeat the error above, but I wan't to undestand what is happening.
I don't think it has to do something with the 3 instances working now, but I have to control the situtation, because the database is becoming corrupted.

I highly suggest that you beat on the system as a single instance and make sure you've gotten all the issues out before running multiple instances. It's best to be confident of your code running by itself before introducing other factors. As others have mentioned on the list before, you can do a lot to mitigate the issues of multiple processes committing to the database, but you can't completely eliminate them. You need to be sure that your code can independently deal with a failure to update the DB.


Ken


Frank Op 5-apr-07, om 16:32 heeft Ken Anderson het volgende geschreven:

Frank,

If you run with a single instance, does it ever have a problem? Sounds to me like you're having problems with the snapshot not being fresh.

Ken

On Apr 5, 2007, at 10:27 AM, Frank Stock wrote:

Hi All,

I have been working for 2 days on this. Readed 'Managing the Object Grapth' again. But I don't understand this.
I have 3 instances running with this application. I have a second application that randomly fetch, insert/update and delete one row choosing one of the instances. (I use SOAP-calls)


This is my routine with the locking:

public void deleteWebtextValue (String webtext, String language) {
//NSLog.allowDebugLoggingForGroups (NSLog.DebugGroupSQLGeneration);
//NSLog.allowDebugLoggingForGroups (NSLog.DebugGroupDatabaseAccess);
//NSLog.setAllowedDebugLevel(NSLog.DebugLevelInformational);
EOEditingContext ec = new EOEditingContext();
try {
ec.lock();
EOQualifier aQual;
NSMutableArray qbind;
EOFetchSpecification fs;

LanguageWebtext lwObject;
// Bepaal het user_userparameter-object voor de gegeven waarden
qbind=new NSMutableArray();
qbind.addObject(webtext);
qbind.addObject(language);
aQual = EOQualifier.qualifierWithQualifierFormat ("(webtext.webtext=%@) and (language.language=%@)",qbind);
fs = new EOFetchSpecification("LanguageWebtext",aQual,null);
NSArray arLanguageWebtext = ec.objectsWithFetchSpecification (fs);
int iLW = arLanguageWebtext.count();
for (int i=0;i<iLW;i++) {
lwObject = (LanguageWebtext)arLanguageWebtext.objectAtIndex(i);
ec.deleteObject(lwObject);
}
ec.saveChanges();
}
finally {
ec.unlock();
ec.dispose();
}
}




How can I controle why WO uses sometimes an Update where there should be Delete. Is there some locking to see on the side of the database? Is there a way I can contole this?

Thanks for tips because I don't get it. Also sometimes one of the instances freezes, but that only happens rare. (Perhaps deadlocking?)

Frank Stock
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40anderhome.com


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:
40global-village.net


This email sent to email@hidden

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
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: 
 >I don't get it.(was delete statement) (From: Frank Stock <email@hidden>)
 >Re: I don't get it.(was delete statement) (From: Ken Anderson <email@hidden>)
 >Re: I don't get it.(was delete statement) (From: Frank Stock <email@hidden>)
 >Re: I don't get it.(was delete statement) (From: Ken Anderson <email@hidden>)
 >Re: I don't get it.(was delete statement) (From: Frank Stock <email@hidden>)

  • Prev by Date: Re: How to Retrieve Session User?
  • Next by Date: Re: I don't get it.(was delete statement)
  • Previous by thread: Re: I don't get it.(was delete statement)
  • Next by thread: Another fault issue???
  • Index(es):
    • Date
    • Thread