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

Separate renameCollection across DB commands into individual oplog entries

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • Backlog
    • 3.5.13
    • Replication
    • None
    • Fully Compatible
    • Repl 2017-08-21, Repl 2017-09-11
    • 0

    Description

      Currently, when we rename across databases, a problem arises with rollback when we are trying to refetch a document in a collection that has been renamed across databases. Even if we are querying by UUID's, because the collection has been copied into another database, this action makes the UUID of the collection to change. Thus, although the document does exist, just under a different namespace and UUID, we will not be able to refetch it during rollback. This leads to data corruption between the sync source and rolling back node.

      A fix for this would be to make the oplog entry for renameCollection a set of create, insert and delete oplog entries instead of a singular oplog entry. This means that even if during rollback, we cannot refetch the document by UUID, when the node has transitioned out of roll back state and into secondary state, we can apply the insertions and maintain consistency.

      Attachments

        Issue Links

          Activity

            People

              benety.goh@mongodb.com Benety Goh
              allison.chang Allison Chang
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: