From: Kal A. <ka...@te...> - 2004-08-18 08:10:57
|
Hi Pete, Did you make these changes to the schema generated by Hibernate or did you change the Hibernate mapping files ? If you did the latter, would it be possible to get a copy of your changes ? If you had to hack the schema generated by Hibernate then I'm a little less clear on the best way to proceed - on the one hand this is an issue we should try to address, but on the other hand I don't want to have to create and maintain a set of schemas for different databases (that was one of the reasons for using Hibernate in the first place!) - perhaps it could be reported as an issue to the Hibernate folks though ? Cheers, Kal On Fri, 2004-08-06 at 10:35, Pete Lewin-Harris wrote: > I'm getting a problem with deadlocks being reported by the database when I > load test tm4j using multiple threads adding, editing and deleting topics on > multiple topic maps. I'm running with the hibernate backend and a postgres > database. > > I've googled this problem and it seems that it is a known postgres > 'feature'. The point is that before updating a row the database locks for > update all foreign keys for that row. This can cause problems if there are > many foreign keys on a table (such as tmobjects in tm4j) due to different > threads trying to lock the same table rows in different orders (i.e. an add > locks rows in a different order to an edit) and so deadlocks can appear. > > The soultion to this seems to be changing the schema to reduce the > likelyhood of deadlocks. I have managed to reduce the frequency of this > problem by reordering the foreign keys and removing the foriegn key from the > topicMap column on tmobjects to topicmaps but this is a fairly temporary > bodge. > > cheers, Pete > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by OSTG. Have you noticed the changes on > Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, > one more big change to announce. We are now OSTG- Open Source Technology > Group. Come see the changes on the new OSTG site. www.ostg.com > _______________________________________________ > Tm4j-developers mailing list > Tm4...@li... > https://lists.sourceforge.net/lists/listinfo/tm4j-developers -- Kal Ahmed <ka...@te...> techquila |