cockroach
cockroach copied to clipboard
logical: add cross cluster write tests to verify LWW semantics
trafficstars
TestLWWConflictResolution tests how insert conflicts are handled under the default last write wins mode. The test cases are as follows:
- The incoming row to the processor is older than the current row
- The incoming row to the processor is newer than the current row For each of these test cases, the current row can either be a local write (crdb_replication_origin_timestamp is NULL) or a prior remote write (crdb_replication_origin_timestamp is populated with the MVCC timestamp of the incoming row). All of those combinations are tested with both the SQL row processor and the KV row processor. Note that currently, KV row proc write conflicts result in a fallback to the SQL row processor.
Release note: none Fixes: #128814
the commit msg could be updated as well actually
@msbutler The test cases are up to date, but I don't explain who wins the conflict. Do you want me to elaborate on that?
bors r=msbutler