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

Two Phase Drops: add NamespaceString support for drop-pending collections

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.8
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • Repl 2017-05-29

      In replication mode, when a collection is being prepared for a 2-phase drop, we rename the collection to a non-user accessible namespace while we wait for the drop to be confirmed by the rest of the replica set. The proposed namespace for the collection while the drop is pending is:

      Original namespace:
      <db>.<coll>

      Drop-pending namespace:
      <db>.system.drop.<optime>.<coll>

      <optime> is the optime of the oplog entry generated for the collection drop that will be propagated to the rest of the replica set and is formatted as follows:
      <timestamp seconds>i<timestamp increment>t<optime term>

      <coll> is appended to the drop-pending namespace for purely informational purposes only. If the generated namespace exceeds the the maximum namespace length, <coll> may be truncated as necessary.

      Once the collection has been renamed to a drop-pending namespace, it will not be eligible for initial sync or visible to listCollections requests without special flags.

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            benety.goh@mongodb.com Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: