DEV Community

anuj kumar
anuj kumar

Posted on

Two Users. One Row. Who Wins?

The rule I'd remember

Optimistic locking is particularly good when:

  • multiple actors can read and later modify the same entity;
  • there can be significant time between read and write;
  • concurrent modifications are possible but not normally frequent;
  • silently overwriting somebody else's change would be incorrect. It becomes less attractive when conflicts are expected constantly.

Top comments (0)