-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework, Sharding
-
None
-
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.
- depends on
-
SERVER-46131 Fix race in retry loops in MigrationSourceManager
- Closed
- is depended on by
-
SERVER-45542 Support and test $unionWith aggregation stage within a transaction
- Backlog
- is duplicated by
-
SERVER-32724 Error if $lookup or $out needs to contact a remote shard
- Closed