Skip to content

Add lock for concurrent migrations running from several nodes #45

Closed
@dskarataev

Description

Hi,

could you please add a lock for migrations? Our API runs migrations right before initialization and it's running on more than one node, so we have conflicts because the migrations try to apply at the same time from different nodes. It's ok for CREATE IF NOT EXIST or ALTER but not so good for datafixes like simple INSERT new value.

Please consider to acquire access using GET LOCK or some similar approach, thanks.

http://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#function_get-lock

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions