In the book Designing Data-Intensive Applications > chapter-5 > Leaderless replication > Detecting Concurrent Writes, below is what Author says while talking about Last write wins (LWW)
The only safe way of using a database with LWW is to ensure that a key is only written once and thereafter treated as immutable, thus avoiding any concurrent updates to the same key. For example, a recommended way of using Cassandra is to use a UUID as the key, thus giving each write operation a unique key
If keys are immutable, why do I even need LWW? Am I missing something here?
<opinion>LWW sounds like a stupid way to design a database.</opinion>. Most modern RDBMs have "transactions" to deal with "simultaneous" writes. That usually involves "rolling back" one of the competing clients. I have used databases for over 30 years; I have never heard of LWW.