Discussion about this post

User's avatar
Prakhar Kulshrestha's avatar

We have a read heavy resource where we have implemented pessimistic locks. Going optimistic might just unlock some performance.

Expand full comment
Vipin Baswan's avatar

Interesting read!

I think the failure rate might be higher if

1) op was more computationally intensive than atomic read-write

2) update wasn't on the same computer, which will force us to think of network latencies, packet losses, partitions, between DB client and actual server.

I might need to check if some enterprise or OS DB has done such analysis. Optimistic still is a better fit for use-cases involving simple updates, I have often used DDB's optimistic locking at work: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBMapper.OptimisticLocking.html

Expand full comment
5 more comments...

No posts