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

aggregate() namespace resolution and collMod are not synchronized (anymore)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • Operating System:
      ALL
    • Sprint:
      Execution Team 2020-04-06
    • Linked BF Score:
      24

      Description

      Since we no longer take a DB MODE_X lock for collMod (see SERVER-46865), the code for resolving namespaces in aggregate(), which takes a DB MODE_IS lock, does not necessarily see a consistent "view" of the view catalog. See link.

      This means that aggregate() can execute a pipeline on a set of view definitions that are not valid/nonsensical and possibly even contain a cycle.

      One potential fix would be to have the view resolution in run_aggregate be performed while holding a collection IS lock on system.views. I believe this will fix the issue as long as collMod continues taking a collection X lock (see here).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              gregory.noma Gregory Noma
              Reporter:
              ian.boros Ian Boros
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: