When using the Novulo platform, there are four different phenomena that are all called Locks. It’s important to know what they are.
- Record locks
- Exclusive locks
- Database locks
- Model locks
Record locks
Record locks are used in all applications when data is modified, see also Novulo data processes .
This record lock means dat the information about the record is loaded into the transaction storage of the web server. In the process of modifying data, it means dat the Locked record (the record in the transaction storage) has different values than the values in the database. To the end user, the values in the lock are displayed and these values prevail over database values. A “commit record” action saves the data in the database.
The lock only exists in the session for the user that is performing the modification process. Other users see database values. Also, it is not locking the record from changes for other users.
Exclusive lock
Exclusive lock is included of the Record Tools plugin.
An exclusive lock is a process that allows records to be locked exclusively. This action does prevent other users from performing modifications, but only when they also ask for an exclusive lock. That means that it’s not a way to be sure that no other user modifies the record, but it can make sure that others users of a specific process - with Exclusive Lock implemented - are not making simultaneous modifications.
An example where this is used is the process to determine the next invoice number, to avoid duplicates.
Database locks
Database locks are originating from database behaviour and are not necessarily unique to Novulo applications. There’s much information online.
Database locks can occur when databases are set-up to not read and write simultaneously in the same records to prevent false readings.
In applications that are used extensively, when performing large read queries that are mixed with write queries, it can cause delays when queries are waiting.
There are various way to identify and prevent table lock delays which will be explained in a later post.
Model locks
Novulo models can only be opened for writing by one user at the time. Other users can open the model in read only mode.
When a user had opened a model, the model becomes locked until they close it.