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

List Databases command should apply filter on name only before database locks

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.3, 3.5.4
    • Component/s: Storage
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v3.4
    • Sprint:
      Storage 2017-03-06

      Description

      Right now, the listDatabases command checks for locks on each database (https://github.com/mongodb/mongo/blob/d7bd800d3d06004c4ca9114627ee882442e4d5e4/src/mongo/db/commands/list_databases.cpp#L129-L146) before actually checking the filter on the query (https://github.com/mongodb/mongo/blob/d7bd800d3d06004c4ca9114627ee882442e4d5e4/src/mongo/db/commands/list_databases.cpp#L148-L151).

      This means that if any user is doing a command that takes a lock on database a, (i.e. building an index), no one can run a listDatabase command, even if they've used a filter that should exclude database a.

      cc Geert Bosch

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: