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

renameCollection should always lock system.views collection after everything else

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.12
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Fully Compatible
    • ALL
    • Storage NYC 2019-05-06, Storage NYC 2019-05-20
    • 5

      renameCollection now locks source and target namespaces sequentially based on their resourceIds order. But we should make an exception for "db.system.views" collection because any operation that triggers a view catalog reload will lock "db.system.views" in IS mode in the end.
      For example, if an operation locks A first and then "db.system.views", and a concurrent renameCollection locks "db.system.views" first and then A, there could be a deadlock.

      Therefore, renameCollection should always lock system.views in the end.

            Assignee:
            xiangyu.yao@mongodb.com Xiangyu Yao (Inactive)
            Reporter:
            xiangyu.yao@mongodb.com Xiangyu Yao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: