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

In sharded_agg_helpers.cpp we retrieve CollectionRoutingInfo without checking for transaction

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • QE 2023-08-21, QE 2023-09-04

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: