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

In sharded_agg_helpers.cpp we retrieve CollectionRoutingInfo without checking for transaction

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0, 7.0.9
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v7.0
    • QE 2023-08-21, QE 2023-09-04

      We now use CollectionRoutingInfo, provided by CollectionRouter for out shard targeting: https://github.com/mongodb/mongo/blob/5c14aa402e3cbab58d8de1e891f00e91deb023e5/src/mongo/db/pipeline/sharded_agg_helpers.cpp#L1797

      But we used to call getExecutionNsRoutingInfo function instead:

      https://github.com/mongodb/mongo/blob/5c14aa402e3cbab58d8de1e891f00e91deb023e5/src/mongo/db/pipeline/sharded_agg_helpers.cpp#L851

      The core difference is that it accounts for snapshot isolation transactions: https://github.com/mongodb/mongo/blob/5c14aa402e3cbab58d8de1e891f00e91deb023e5/src/mongo/s/cluster_commands_helpers.cpp#L791

      We should add a test to check if there is a problem and fix it.

            Assignee:
            ivan.fefer@mongodb.com Ivan Fefer
            Reporter:
            ivan.fefer@mongodb.com Ivan Fefer
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: