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

Rename collection with dropTarget should drop the target even if the source doesn't exist

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • ALL
    • v3.6
    • Repl 2018-01-15, Repl 2018-01-29, Storage 2018-02-12, Storage 2018-02-26
    • 61

      Consider the following scenario:

      Create db.collection1 with UUID U1 at time T1.
      Create db.collection2 with UUID U2 at time T2
      Rename db.collection1 (U1) to db.collection2 (U2) with dropTarget: true at time T3
      Drop db.collection2 (U1) at time T4

      Now do an initial sync, starting the clone at some time after T4, but with the oplog replay start point of T2.

      After the clone, no collections exist in db. After applying the entry at T2, db.collection2 (U2) exists. Applying the entry at T3 fails. The drop at T4 is for UUID U1, so it fails too. Now initial sync is done and a spurious collection2 exists. The rename should have dropped it, despite the source not existing.

            Assignee:
            xiangyu.yao@mongodb.com Xiangyu Yao (Inactive)
            Reporter:
            matthew.russotto@mongodb.com Matthew Russotto
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: