Forcing collection deletion in MongoDB

I cannot delete a collection that tells me false every time.

I do a getCollections() , it gives me a lot of tmp.mr.mapreduce_1299189206_1618_inc (the ones I want to delete). I thought they were deleted during the shutdown, but they are not (in my case).

Then when I do: db["tmp.mr.mapreduce_1299188705_5595"].drop() I always get false and not deleted.

Logs are not very useful:

 Wed Mar 9 11:05:51 [conn4] CMD: drop customers.tmp.mr.mapreduce_1299188705_5595 

Now I have expanded my namespaces and cannot create an additional collection?

By the way, I can go down, this is not production (or even in production, I can also omit it).

+7
source share
1 answer

Now I have expanded my namespaces and cannot create an additional collection?

By default, MongoDB has 20k namespaces, so there are many dead M / R collections. According to the magazines, the database receives a request to delete the collection. So, now the question is whether MongoDB has gone bad.

Can you remove it and restart so that all connections are closed?

How much data? Can you grab it and run --repair?

+3
source

All Articles