# Pessimistic Locking

Record: `arch:pessimistic-locking`
Kind: pattern
Layer: [Atomic Boundary](https://banes-lab.com/records/layer/atomic-boundary.md)
Severity: contextual
Scope: persistence, critical section
Canonical: https://banes-lab.com/ontology#arch-pessimistic-locking

## Repair

- Refactored by: Add Lock, Narrow Lock Scope
- Detected by: concurrent update conflicts
- Violated by: missing lock around critical mutation
- Measured by: lock wait/deadlock rate
- Enforced by: transactional tests

## requires

- [Lock Ownership](https://banes-lab.com/records/lex/lock-ownership.md)

## reinforces

- [Isolation](https://banes-lab.com/records/arch/isolation.md)

## enables

- [Strong Conflict Prevention](https://banes-lab.com/records/lex/strong-conflict-prevention.md)

## tensions-with

- [Deadlocks](https://banes-lab.com/records/lex/deadlocks.md)
- [Latency](https://banes-lab.com/records/arch/latency.md)
- [Lock-Free Throughput](https://banes-lab.com/records/lex/lock-free-throughput.md)

## tensions

- [Pessimistic Locking Deadlocks](https://banes-lab.com/records/tension/deadlocks-pessimistic-locking.md)
- [Pessimistic Locking Latency](https://banes-lab.com/records/tension/latency-pessimistic-locking.md)
- [Pessimistic Locking Lock-Free Throughput](https://banes-lab.com/records/tension/lock-free-throughput-pessimistic-locking.md)
