Get the latest tech news
How Distributed Systems Avoid Race Conditions Using Pessimistic Locking?
Understanding Pessimistic Locks, Leases, and Fence Tokens in Distributed Systems
However, in a multi-process system, there is a chance that the two updates can be executed at the same time by the processes on the shared data source. Solving race conditions by acquiring locks over the shared resource in multi-process system To address this issue, each node in the system must send a new fencing token along with each write request to the shared data resource.
Or read this on Hacker News