Skip to content

PD: Support CAS-style preconditions for keyspace config updates #10214

@hbisheng

Description

@hbisheng

Enhancement Task

PD keyspace config is planned to be used by the TiKV encryption key rotation workflow to store the current and target encryption config version. While the workflow is intended to have a single active actor, unexpected concurrent executions can cause config updates to overwrite each other and break the intended state transition.

PD currently lacks support for conditional (CAS-style) updates, making it impossible to safely express transitions such as setting next_encryption_file_id only if it is absent or advancing current_* only if it matches an expected value.

This issue proposes adding simple preconditions (for example, equal / absent checks) to keyspace config updates so state transitions can be performed safely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementThe issue or PR belongs to an enhancement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions