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

Make dropping a nonexistent database a noop

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9.0
    • Component/s: Replication, Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Minor Change
    • Sprint:
      Sharding 2021-03-22

      Description

      Currently when dropping a nonexistent database, we return a response that contains information about if the database previously existed or not.
       - On replicaset
       - On sharded cluster

      This response is not reliable if a step-down happens during the operation, in fact on step-down the operation is automatically retried on the new replicaset primary. On this new node we don't have any way of assessing previous existence of the database because the old primary could have either already drop it or not.

      Moreover the drop database response is not currently documented anywhere.

      The goal of this ticket is to simplify the drop database response by not returning any information on the previous state of the database being dropped.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tommaso.tocci Tommaso Tocci
              Reporter:
              tommaso.tocci Tommaso Tocci
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: