4 ms·
Martin made no mention of strong vs. eventual consistency. If you write to a store like cassandra using a monotonic token, the result will converge correctly.
by carllerche 11y ago
Martin made no mention of strong vs. eventual consistency.
If you write to a store like cassandra using a monotonic token, the result will converge correctly. If you require to never read "stale" data, you can read / write w/ quorum. There is no linearization in the storage layer in this case.
In this case the lock is not superfluous and you have safety.
Regarding CAS, I said that your argument (in support of redlock) was wrong. I would be happy to respond to a proposed algorithm, but as someone else mentioned, either the storage layer can provide a CAS operation, in which case your lock is not required and the workers read, mutate, CAS, OR if the storage layer has any weaker semantics then it is not possible to ensure safety with a token.
- jhallenworld 11y ago>the storage layer can provide a CAS operation, in which case your lock is not required and the workers read, mutate, CAS Yeah, so Optimistic Concurrency Control. Possibly a Redlock-like lease scheme could be used to improve performance in the high-contention case.