Pessimistic locking worst case -
We are using JavaEE and creating an appellation, where in the worst case, the message queue robbed the message Come in the form of a single user.
So we are considering pessimistic, select theory for locking the theory and solve our problems in fisrt trials.
But we are afraid of Deadlock. Classical people: User X Lock A, the user locks the YB lock But there are a lot of suspicious: system crash, network work, ... and so on. The database is not locking the system, not knowing the reason for it. We will use modern databases such as: Oracle, MS SQL and Postgrescill.
What do we want to know, the pessimistic locking used in production and the prospects of the candidates?
Thanks in advance!
The worst problem I have seen with pessimistic locking is the mandatory bottleneck that the database is created < / P>
In other words, your code is stopping deadlock at the app level (as you say in your post), the display becomes problem - drops throughput because only 1 user at a time One can update the set of data.
It is possible that the locked table is locked, if a system exception occurs, then If possible, by batching updates you can reduce the tootope problem to some extent, but it really depends on your particular situation. select for update is executed but not committed, but It is not large enough (though it clearly depends on your code). I have not seen it through any issue related to basic infrastructure, but only through application errors.
Comments
Post a Comment