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

Drop collections is slow

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.4.24
    • Component/s: None
    • None
    • ALL

      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()
      });
      

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

              Created:
              Updated:
              Resolved: