renameCollection should always lock system.views collection after everything else

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: 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
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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 (Inactive)
              Reporter:
              Xiangyu Yao (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: