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

Refactor rename_collection.cpp

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.11
    • Affects Version/s: None
    • Component/s: Storage
    • Labels:
      None
    • Fully Compatible
    • Storage NYC 2019-04-22, Storage NYC 2019-05-06

      I realized there were some code better to be refactored when I did SERVER-33087 such as:
      1. renameCollectionCommon is shared by both user command's renameCollection and applyOps's renameCollection but those two actually have enough differences.
      2. The parameter TargetUUID is actually the UUID of the source.
      3. We should use the UUID of the source as the single source of truth, making the API of renameCollection like "rename UUID1 to ABC, drop UUID2".
      4. A lot of the unit tests use an arbitrary UUID as the UUID of the source because it's convenient. We should fix those and put invariants in the rename_collection.cpp.
      5. Disable rename across database via applyOps.

            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: