[SERVER-48461] Drop collections is slow Created: 28/May/20  Updated: 28/May/20  Resolved: 28/May/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 3.4.24
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: H C Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

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



 Comments   
Comment by Carl Champain (Inactive) [ 28/May/20 ]

Hi bogumil_h@yahoo.com,

MongoDB 3.4 is already end-of-lifed, which means it is unsupported by us. We strongly recommend you upgrade to a supported version. If you need assistance troubleshooting, I encourage you to ask our community by posting on the MongoDB Community Forums or on Stack Overflow with the mongodb tag.

Kind regards,
Carl

Generated at Thu Feb 08 05:17:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.