Application of common reader locks

what is the need to read a shared lock?

I understand that write locks must be exclusive. But what is the need for many clients to simultaneously access the document and share only the read privilege? Practical applications of common reader locks can also help.

Please move the question to any other forum where you feel comfortable. While this is a purely programming and ABAP theory question I am doing, I am assuming that applications are common across all languages.

Thank!

+3


source to share


1 answer


If you are performing complex and time-consuming calculations based on multiple datasets (such as publications), you must ensure that none of these datasets change during operation, otherwise the calculation may be incorrect. In most cases, ACID principles guarantee this, but sometimes it is not enough - for example, if the data source is so large that you have to split it into parallel subtasks, or if you need to call some function that performs a database commit or rollback internally. In this case, isolation of transactions is no longer enough, and you need to lock the object at the logical level.



+2


source







All Articles