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

Write upgrade test for two phase drop

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.8
    • Affects Version/s: None
    • Component/s: Storage
    • Labels:
      None
    • Fully Compatible
    • Storage NYC 2019-01-28

      We need to verify that an unfinished 4.0-style two phase drop (by-renaming way) could be handled nicely on startup of 4.2 binary.

      If an 4.0-style two phase drop is unfinished on the shutdown of 4.0 binary, it means the first phase (renaming the collection to db.system.drop.xxxx) is completed (committed but not checkpointed yet - there is no db.system.drop.xxx on disk) but the second phase (the drop of db.system.drop.xxx) is not. And a "dropCollection" oplog entry is written (committed and persistent on disk in the form of WT journal).

      On the startup of 4.2 binary, MongoDB will start with the last checkpoint which has the original collection and replay the oplog entries including that "dropCollection". The collection will be dropped with 4.2-style (new way) two phase drop mechanism. There will be no dangling "db.system.drop.xxxx" after startup and 4.2 binary does not need to do anything related to the 4.0-style two phase drop in this case.

      This applies to both primary and secondary nodes. This ticket is to write a upgrade test to verify the theory.

            Assignee:
            xiangyu.yao@mongodb.com Xiangyu Yao (Inactive)
            Reporter:
            benety.goh@mongodb.com Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: