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

Drop collections is slow

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Done
    • Affects Version/s: 3.4.24
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Operating System:
      ALL

      Description

      After upgrading the mongo server from 3.2.6 to 3.4.24 on CentOS Linux 7.6, it seems that dropping collections gets slower in time.

      The application that uses mongo deletes ~10000 collections on startup (all of them are empty collections in our example). With mongo 3.4.24 this is fast (a few seconds) only the first time after the server is started. Afterwards each collection drop time increases (in one example it took 1h30 minutes to delete all collections after the server was running for just a few days).

      With the exception of the server upgrade, there was no other change in the application, mongo server configuration or the linux box. The issue can be replicated from mongo shell too with a script like:

      db.getCollectionNames().filter(function(name){
        return name.match(regExp)
      }).forEach(function(collectionName){
       db.getCollection(aCollectionName).drop()
      });
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            bogumil_h@yahoo.com H C
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: