renameCollectionWithinDBForApplyOps should not use temp collections on primary

XMLWordPrintableJSON

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

      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:
            [DO NOT USE] Backlog - Replication Team
            Reporter:
            Matthew Russotto
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: