Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-44771

Allow operations in transactions to safely consult the CatalogCache on mongod

    • Fully Compatible
    • Sharding 2019-12-30, Sharding 2020-01-13, Sharding 2020-01-27, Sharding 2020-02-10, Sharding 2020-02-24
    • 0

      When brainstorming the design for $unionWith, we are concerned about an issue we have previously run into in such a scenario. esha.maharishi sums up a possible deadlock that can occur when a shard tries to look at the CatalogCache while still holding a lock in this comment. It's also described in SERVER-37398 where we added this invariant to ensure this never happens. This was discovered when working with improved $out (now branded as $merge), but it has implications for sharded $lookup and now $unionWith.

      This ticket tracks a feature request to remove that invariant. It should be possible to query a different shard using the CatalogCache while you are in a transaction (and thus hold some locks which you cannot drop). Currently you cannot do this because it may deadlock.

            Assignee:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: