Skip to content

2 successful creates for a resource of the same name may happen #504

@ranchyang96

Description

@ranchyang96

Here is a problem we encountered recently. We use kine for database access and operations. The application would frequently create/delete a specific resource. At high loads, multiple threads/requests try to create a specific resource with the same name at the same time. If this happens right after the specific resource is deleted, there would be a slight chance that 2 create of the resource with the same name would succeed at almost the same time. It happens because the kine table has name and prev_revision as unique keys. The 2 creates uses the same name but different prev_revisions. The earlier one would use the recently-deleted revision and the latter one would use 0. Is my analysis correct? Anyone ever encountered the same problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions