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

renameCollectionWithinDBForApplyOps should not use temp collections on primary

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Backlog
    • Major - P3
    • Resolution: Unresolved
    • None
    • None
    • Replication
    • None
    • Replication
    • ALL
    • 25

    Description

      In the case of renaming a collection when the target exists but has a UUID which does not match the drop target UUID of the op being applied, we rename the old target out of the way. This is necessary for idempotence in oplog application, but we should not do it when using applyOps on the primary (when opCtx->writesAreReplicated()) . Instead, we should return NamespaceExists as the ordinary rename command would.

      Using opCtx->writesAreReplicated() for the distinction is consistent with how we treat a "renameOpTime" in applyOps.

      Attachments

        Issue Links

          Activity

            People

              backlog-server-repl Backlog - Replication Team
              matthew.russotto@mongodb.com Matthew Russotto
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated: