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

dropDatabase may log a confusing number of collection drops

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.7
    • Affects Version/s: None
    • Component/s: Logging, Storage
    • None
    • Fully Compatible
    • ALL
    • v4.0, v3.6
    • Hide

      Observed on 3.6.5 on macOS

      db.foo.insert({})
      db.dropDatabase()
      

      In the logs:

      2018-06-27T06:38:26.738-0400 I COMMAND  [conn6] dropDatabase test - starting
      2018-06-27T06:38:26.738-0400 I COMMAND  [conn6] dropDatabase test - dropping 0 collections
      2018-06-27T06:38:26.768-0400 I COMMAND  [conn6] dropDatabase test - finished
      
      Show
      Observed on 3.6.5 on macOS db.foo.insert({}) db.dropDatabase() In the logs: 2018-06-27T06:38:26.738-0400 I COMMAND [conn6] dropDatabase test - starting 2018-06-27T06:38:26.738-0400 I COMMAND [conn6] dropDatabase test - dropping 0 collections 2018-06-27T06:38:26.768-0400 I COMMAND [conn6] dropDatabase test - finished
    • Storage NYC 2018-12-31, Storage NYC 2019-01-14

      I believe that if a collection is dropped very quickly as part of dropDatabase, we do not count it in the dropDatabase command. This can confuse some users since we may log that no collections were dropped. We could either make this number always accurate or clarify what metric it is tracking.

            Assignee:
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Reporter:
            kelsey.schubert@mongodb.com Kelsey Schubert
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: