Nested transaction blocks on different databases look atomic but are not: the inner one commits when its block exits. ActiveRecord::XA runs them as one transaction with MySQL's XA two-phase commit, so every database commits or none does. A durable decision log and a recovery task finish whatever a crash leaves half done. Models are used exactly as normal inside the block.

Required Ruby Version

>= 4.0

Authors

Vlad Radulescu

Versions

  1. 0.1.0
    1. source

      1. 0.1.0 source November 27, 2026 (29.5 KB)

Pushed by

SHA 256 checksum