Skip to content

*: implement shared lock for foreign key usage #66154

@you06

Description

@you06

Feature Request

See tikv/tikv#19087 for details.

Is your feature request related to a problem? Please describe:

The current foreign key check is implemented by the exclusive locks in parent tables, which can easily be a bottleneck for the foreign key write workloads.

Describe the feature you'd like:

Use shared lock to unleash the performance of foreign key write workloads.

Describe alternatives you've considered:

Turn off foreign key constaint check(foreign_key_checks) which can introduce the risks of data correctness in foreign key use cases.

Teachability, Documentation, Adoption, Migration Strategy:

Introduce a new variable tidb_foreign_key_check_in_shared_lock, default off, and enable it when the user want more throughput in a single parent table's row.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/feature-requestCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions