To add to the above question - what happens when multiple threads try to read the same data.
I was going through the documentation and noticed the following information
- LOCK manage the locking strategy. By default is "default", that means release the lock once the record is read, while "record" means to keep the record locked in exclusive mode in current transaction till the transaction has been finished by a commit or rollback operation
Are the records locked for read? If yes, what is the recommended strategy to allow multiple threads to read the data.
Is it optimistic locking?
There are multiple business scenario in our application where we access the same record for read.
Just to give some background we have migrated from RDBMS and in the new paradigm we were were wondering if it is a bad design to allow multiple threads to access the same record?