Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing documentation about concurrent runs of MigrationHarness::run_pending_migrations #3707

Open
3 tasks done
ISibboI opened this issue Jul 19, 2023 · 1 comment
Open
3 tasks done

Comments

@ISibboI
Copy link
Contributor

ISibboI commented Jul 19, 2023

Setup

Versions

  • Diesel: 2.1.0

Problem Description

The documentation of MigrationHarness::run_pending_migrations does not mention if the method can safely be called concurrently from e.g. two different processes.

Will this lead to the same migrations being applied twice, will one of the method calls fail (with a panic or an error?), or will all calls simply block until the migrations are finished?

What are you trying to accomplish?

Automatically apply pending migrations on application startup, but the application is architectured to have multiple backend processes running concurrently.

Checklist

  • This issue can be reproduced on Rust's stable channel. (Your issue will be
    closed if this is not the case)
  • This issue can be reproduced without requiring a third party crate
@weiznich
Copy link
Member

I'm happy to accept a PR that adds this information to the documentation.

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

No branches or pull requests

2 participants