diff --git a/pkg/ccl/crosscluster/logical/lww_kv_processor.go b/pkg/ccl/crosscluster/logical/lww_kv_processor.go index 954b352a0810..f5d8d6f5a372 100644 --- a/pkg/ccl/crosscluster/logical/lww_kv_processor.go +++ b/pkg/ccl/crosscluster/logical/lww_kv_processor.go @@ -411,7 +411,7 @@ func (p *kvTableWriter) insertRow(ctx context.Context, b *kv.Batch, after cdceve OriginTimestamp: after.MvccTimestamp, // TODO(ssd): We should choose this based by comparing the cluster IDs of the source // and destination clusters. - ShouldWinTie: true, + // ShouldWinTie: true, } return p.ri.InsertRow(ctx, &row.KVBatchAdapter{Batch: b}, p.newVals, ph, oth, false, false) } @@ -432,7 +432,7 @@ func (p *kvTableWriter) updateRow( OriginTimestamp: after.MvccTimestamp, // TODO(ssd): We should choose this based by comparing the cluster IDs of the source // and destination clusters. - ShouldWinTie: true, + // ShouldWinTie: true, } _, err := p.ru.UpdateRow(ctx, b, p.oldVals, p.newVals, ph, oth, false) return err @@ -452,7 +452,7 @@ func (p *kvTableWriter) deleteRow( OriginTimestamp: after.MvccTimestamp, // TODO(ssd): We should choose this based by comparing the cluster IDs of the source // and destination clusters. - ShouldWinTie: true, + // ShouldWinTie: true, } return p.rd.DeleteRow(ctx, b, p.oldVals, ph, oth, false) diff --git a/pkg/ccl/crosscluster/logical/lww_row_processor.go b/pkg/ccl/crosscluster/logical/lww_row_processor.go index 809ef4ad0690..cf18d9d2981d 100644 --- a/pkg/ccl/crosscluster/logical/lww_row_processor.go +++ b/pkg/ccl/crosscluster/logical/lww_row_processor.go @@ -588,9 +588,9 @@ VALUES (%s) ON CONFLICT (%s) DO UPDATE SET %s -WHERE (t.crdb_internal_mvcc_timestamp <= $%[6]d +WHERE (t.crdb_internal_mvcc_timestamp < $%[6]d AND t.crdb_internal_origin_timestamp IS NULL) - OR (t.crdb_internal_origin_timestamp <= $%[6]d + OR (t.crdb_internal_origin_timestamp < $%[6]d AND t.crdb_internal_origin_timestamp IS NOT NULL)` )