Conflicts can arise if applications update the same item in different regions at about the same time. To ensure eventual consistency, DynamoDB global tables use a “last writer wins” reconciliation between concurrent updates, where DynamoDB makes a best effort to determine the last writer. With this conflict resolution mechanism, all of the replicas will agree on the latest update, and converge toward a state in which they all have identical data.
This is what the AWS docs say. I am don't understand how "last writer wins" policy can lead to a consistent global database?
E.g.
Region 1 gets write order T1 (set value to 0) T2 (set value to 5) Region 2 gets write order T2 (set value to 5) T1 (set value to 0)
The records are applied in different order in 2 places and the end result is different. Region 1 has value 5 and Region 2 has value 0.
Is this really what DynamoDB does?