Jade Implicit Locking
Jade puts a shared lock on collections when reading them, to prevent them being altered by another process. This lock is released when the read function is finished, unless the process remains in either transaction or load state.
Jade will automatically lock an object (including a collection object) if that object is updated in any way. Normally, this will be an exclusive lock, but it will be an update lock if the updating process has enabled update locks, and the object being updated is a collection. Jade does this implicit locking to ensure that:
-
No one else will view that object in an incomplete state.
-
No one else will view uncommitted data, as that update may be backed out if the transaction aborts.
-
You have the latest edition of an object in cache before you update it. (Jade has an underlying principle that it will never allow you to update an out‑of‑date object; that is, dirty write.)