cockroach icon indicating copy to clipboard operation
cockroach copied to clipboard

logical: add cross cluster write tests to verify LWW semantics

Open navsetlur opened this issue 1 year ago • 1 comments
trafficstars

TestLWWConflictResolution tests how insert conflicts are handled under the default last write wins mode. The test cases are as follows:

  1. The incoming row to the processor is older than the current row
  2. 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

navsetlur avatar Aug 29 '24 05:08 navsetlur

This change is Reviewable

cockroach-teamcity avatar Aug 29 '24 05:08 cockroach-teamcity

the commit msg could be updated as well actually

msbutler avatar Aug 30 '24 20:08 msbutler

@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?

navsetlur avatar Aug 30 '24 21:08 navsetlur

bors r=msbutler

navsetlur avatar Aug 30 '24 21:08 navsetlur