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

Allow an aggregation sub-operation on a shard to target itself when running in a transaction

    XMLWordPrintable

Details

    • Improvement
    • Status: Backlog
    • Major - P3
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      Certain aggregation stages involve sub-operations or sub-pipelines, which may involve targetting and reading from sharded collections when running on a shard (e.g. $lookup, $unionWith). Supporting such stages in a transaction would cause a deadlock on the session mutex if the sub-operation targets the same node its running on, similar to what is described in SERVER-33683. Note that SERVER-33683 allows a $mergeCursors to run on a shard in a txn, but does not support the case when a stage starts its own sub-operation.

      For this ticket, one possible solution that was discussed would be to use the resource yielder that was built in SERVER-33683 within the MultiStatementTransactionRequestsSender if one of the remote shards involved happens to be itself.

      Attachments

        Issue Links

          Activity

            People

              backlog-query-optimization Backlog - Query Optimization
              nicholas.zolnierz@mongodb.com Nicholas Zolnierz
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: