Describe the problem
The UC column set is built from key columns only; an UPDATE that keeps the key
columns but moves the row into/out of the index predicate acquires/releases the
unique value with no lock emitted. Partial unique indexes pass txn-mode creation
checks (checkUniqueIndexesMatch compares key columns, not predicates) and
tree.IsAllowedLDRSchemaChange even allows creating one mid-stream (which the
once-at-startup NewLockSynthesizer never sees).
Impact
Missed conflicts on partial unique indexes → duplicate-key errors / divergence.
Code references
Suggested fix
Disable the equality skip for partial unique indexes, or reject them in txn-mode
validation and close the mid-stream loophole.
Epic CRDB-65552
Jira issue: CRDB-65609
Describe the problem
The UC column set is built from key columns only; an UPDATE that keeps the key
columns but moves the row into/out of the index predicate acquires/releases the
unique value with no lock emitted. Partial unique indexes pass txn-mode creation
checks (
checkUniqueIndexesMatchcompares key columns, not predicates) andtree.IsAllowedLDRSchemaChangeeven allows creating one mid-stream (which theonce-at-startup
NewLockSynthesizernever sees).Impact
Missed conflicts on partial unique indexes → duplicate-key errors / divergence.
Code references
Suggested fix
Disable the equality skip for partial unique indexes, or reject them in txn-mode
validation and close the mid-stream loophole.
Epic CRDB-65552
Jira issue: CRDB-65609