3 ms·
No. Please read about MVCC: https://en.m.wikipedia.org/wiki/Multiversion_concurrency_control https://en.m.wikipedia.org/wiki/Multiversion_concurrency_con... Th
by kccqzy 7y ago
No. Please read about MVCC: https://en.m.wikipedia.org/wiki/Multiversion_concurrency_control https://en.m.wikipedia.org/wiki/Multiversion_concurrency_con...
The tl;dr is that
> Locks are known to create contention especially between long read transactions and update transactions. MVCC aims at solving the problem by keeping multiple copies of each data item. In this way, each user connected to the database sees a snapshot of the database at a particular instant in time. Any changes made by a writer will not be seen by other users of the database until the changes have been completed (or, in database terms: until the transaction has been committed.)
In other words, the system uses immutable state under the hood plus some atomics/locking to present the abstraction of safe shared mutable state.
- deleted 7y ago[deleted]