Skip to content

Instantly share code, notes, and snippets.

@zucchinidev
Created May 15, 2021 12:43
Show Gist options
  • Save zucchinidev/879bf552a7b518942512411d7ffc03e5 to your computer and use it in GitHub Desktop.
Save zucchinidev/879bf552a7b518942512411d7ffc03e5 to your computer and use it in GitHub Desktop.
Optimistic concurrency
// Optimistic concurrency control assumes that many transactions can frequently
// complete without interfering with each other. While running, transactions use
// data resources without acquiring locks on those resources. Before committing,
// each transaction verifies that no other transaction has modified the data it has read.
// If the check reveals conflicting modifications, the committing transaction rolls back
// and can be restarted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment