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

Two Phase Drops: rolling back cross database renameCollections fails if there is both a dropTarget and dropSource collection

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.11
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • ALL
    • Hide

      Triggered by rollback code in SERVER-29959.

      Rolling back a renameCollection command where it drops two collections in the same oplog entry because it is a cross-database rename with both dropSource and dropTarget specified.

      Show
      Triggered by rollback code in SERVER-29959 . Rolling back a renameCollection command where it drops two collections in the same oplog entry because it is a cross-database rename with both dropSource and dropTarget specified.
    • Repl 2017-07-31

      With a renameCollection command across databases, it is possible that two collections are specified to drop at the same optime, the dropSource and dropTarget collections. When we try to rollback these two drops using 2-phase drop, because the two drops have the same optime, the following error is thrown below. This is only a problem with renameCollection across databases. In a same database renames, only dropTarget can be present.

      Failed to add drop-pending collection foo.system.drop.2i0t5.t with drop optime { ts: Timestamp 2000|0, t: 5 }. There is already an existing collection test.system.drop.2i0t5.t with the same drop optime.
      
      

      The collections are in two different databases, "foo" and "test," but have the same optime, "2i0t5."

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

              Created:
              Updated:
              Resolved: