recall

← recall

pessimistic locking term

take a lock before reading, hold until done

Default mode of most DBs for explicit locking. SELECT ... FOR UPDATE. Right when contention is high. Wrong when held long — blocks others.

topics: concurrency, locks, databases

references: