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

Option to join multiple allow atomic persistence contexts into a single context

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0.rc0
    • Affects Version/s: None
    • Component/s: Persistence
    • None

      Currently nesting `atomically` calls makes each call have its own atomic context. When each block completes, its changes get persisted.

      It can be useful to nest these atomic contexts, such that changes to the same document made in different blocks are persisted together in a single atomic operation.

      The nesting must be opted into either via an option to `atomically` or a global configuration option `join_contexts`. This option can also be used to join transaction contexts in the future.

      PR: https://github.com/mongodb/mongoid/pull/4562

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: