Skip to content
Latchkey

Optimistic Locking - CI/CD Glossary Definition

Optimistic locking detects concurrent edits without holding a lock: each row carries a version, and an update only succeeds if the version still matches, otherwise the writer retries.

Versus pessimistic

Optimistic locking assumes conflicts are rare and pays nothing until one happens, where it fails the update and forces a retry. It scales better than holding locks when contention is low.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →