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!
|
|