Ignore and override
Service: Retry Loop
"Async" language features
Options, DB Lock with wait No conflicts (serialized by locking), Check-out, DB Lock with NoWait, Pessimistic offline lock
Not well suited for stateless or disconnected scenarios
Conflict Detection, Compare column values, All columns, Some columns, Modified columns only, Row hash, Compare row version, Version Integer, SQL Server RowVersion (auto incremented), Oracle, ORA_ROWSCN (is not dependable) (auto incremented), Manual increment via trigger, Timestamp (not fine grained enough)
Good for serializing updates
May need performance tuning
Conversion Deadlock (SQL Server only)
Stateless, Web app, Stateless service
Using connection pooling, Transactions allow pessimistic locking across connections
SQL Server, Pessimistic (default), Serializable (costly), Read Committed, ..., Optimistic, Read Committed Snapshot, Snapshot, ...
Oracle (optimistic), Serializable (OK), Read Committed, Readonly
Uset SET x=x+5% instead of SELECT x NewX = x+5% UPDATA SET x=NewX
Query: Read Committed
Submit: Repeatable Read
SQL Server optimistic "Row Versioning"
Retries for transient conditions needed
Consistency, Read Consistency, Statement level, Transaction level, ...