Skip to content

crosscluster/logical: transactional LDR partial unique index predicate transitions defeat the unchanged-skip #172374

Description

@jeffswenson

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-logical-data-replicationC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.O-agentFiled by an AI agent; usually the result of a human/agent investigation sessionT-cdc

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions