-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: table and row locks occur in cocurrent update
PostPosted: Fri Feb 03, 2012 11:41 pm 
Newbie

Joined: Fri Feb 03, 2012 11:22 pm
Posts: 1
Hi,

I facing problem with locks on table when cocurrent updates are made to tables. There are multiple tables joined with foreign keys. What happens is that the while one update is in progress, the next update waits for locks to get released. The lock then lingers on the database, which has to be killed manually.
The problem worsens if there are hundreds of users trying to update same entity in space of few seconds.

What happens beneath is that when updating this entity hibernate fires updates, followed by delete and then inserts. I remove objects from entity then do a flush(). I then add new objects into entity and I do merge() and then commit() all in same transaction.

Is there a way that these locks get release on its own once the updates are finished? Or is the problem is because I am doing flush(), merge() and commit() in same transaction?

Will greatly appreciate any reply

Thanks


Top
 Profile  
 
 Post subject: Re: table and row locks occur in cocurrent update
PostPosted: Sun Feb 05, 2012 3:27 am 
Beginner
Beginner

Joined: Wed Jan 07, 2009 7:07 pm
Posts: 26
Consult your DBA and try to find what is causing the lock. He might be able to pin point the query which is taking the exclusive lock. Also check your DB locking strategy and isolation level.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.