-->
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.  [ 1 post ] 
Author Message
 Post subject: two threads hitting the same row @ exactly the same time
PostPosted: Wed Aug 03, 2011 2:59 pm 
Newbie

Joined: Wed Aug 03, 2011 1:50 pm
Posts: 1
Given that majority of today's systems are at least dualcore systems I'm wondering what might happen if two threads hit the same database row at exactly the same time (with each thread running on a different core)


Let's assume I'm using optimistic locking, either by timestamp versioning or increments. Should I take any precautious measures in the case that an entity is modified at the (exactly) same time by those threads ( disregarding how small the probability of such a coincidence might actually be)? For instance should I prefer incremental over timestamp versioning or vice versa? How does Hibernate or for that matter any multithreaded database handle this case? Is this even a situation one should worry about?

We discussed this matter in our team today but couldnt reach a consistent conclusion.

any insight would be greatly appreciated!


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

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.