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

renameCollectionWithinDBForApplyOps should not use temp collections on primary

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Replication
    • ALL
    • 25

      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.

            Assignee:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            matthew.russotto@mongodb.com Matthew Russotto
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: