Skip to content

Commit

Permalink
Rephrase sentences
Browse files Browse the repository at this point in the history
  • Loading branch information
wowinter13 authored and weiznich committed Jan 28, 2025
1 parent e070fcb commit 1c5cf1c
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions diesel_migrations/src/migration_harness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,14 @@ pub trait MigrationHarness<DB: Backend> {

/// Execute all unapplied migrations for a given migration source
///
/// # Concurrent Usage
/// This method may be called concurrently from multiple processes. However:
/// * Only one process will successfully apply each migration
/// * Other concurrent processes may receive database lock errors
/// * Processes that start after successful migration will find no pending migrations
/// * No migrations will be applied more than once
/// # Concurrent Usage Safety
/// This method can be safely called concurrently from multiple processes. The behavior is as follows:
///
/// * All migrations are applied atomically by the first process that successfully acquires the database lock
/// * Concurrent processes attempting to run migrations while the lock is held will receive a "database is locked" error
/// * Processes that start after successful migration completion will find no pending migrations and complete successfully
/// * Each migration is guaranteed to be applied exactly once
///
/// For SQLite databases, concurrent calls may result in "database is locked" errors
/// due to SQLite's locking mechanism. Applications should be prepared to handle
/// these errors and potentially retry the operation.
fn run_pending_migrations<S: MigrationSource<DB>>(
&mut self,
source: S,
Expand Down

0 comments on commit 1c5cf1c

Please sign in to comment.