Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-5552

Detect usage of different clients in transactions

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 9.0.0
    • Affects Version/s: None
    • Component/s: Transactions
    • Labels:
      None

      Current implementation of the higher level transaction API allows using different clients inside the transaction block. The documentation states that "it is recommended that only objects that use the same client is used inside the transaction method block"; this is not enforced, though.

      This is a dangerous situation that may let to surprising results. It would be better if we can detect such situations, and either raise an error, or at least log a warning.

            Assignee:
            jamis.buck@mongodb.com Jamis Buck
            Reporter:
            dmitry.rybakov@mongodb.com Dmitry Rybakov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: