Reads don't need locks in Snapshot Isolation mode


Last Updated on Feb 12, 2021

Reads do not require any locks in Snapshot Isolation - a key principle of this Isolation mode is readers never block writers, and writers never block readers.

A transaction changing an object's value has to wait if the object has already been altered by another transaction. The transaction is allowed to continue only after the other transaction has been committed or aborted. But reads can continue unhindered in the background.

This allows long-running queries to have a consistent snapshot of application data while the database continues to accept writes. Because reads are never blocked, the database can handle such queries while allowing writes to continue normally, preventing any lock contention between reads and writes.


© 2022 Ambitious Systems. All Rights Reserved.