[SERVER-20200] Database's size upon collection removing Created: 29/Aug/15  Updated: 31/Aug/15  Resolved: 31/Aug/15

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

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

Operating System: OS X
Steps To Reproduce:

1. Create collection

use students;
db.grades.drop();
for (i = 0; i < 10000000; i++) {
for (j = 0; j < 4; j++) {
assess = ['exam', 'quiz', 'homework', 'homework'];
record =

{'student_id':i, 'type':assess[j], 'score':Math.random()*100}

;
db.grades.insert(record);
}
}

2. Drop collection grades
3. show dbs command will show you that size of database was not changed
4. Removed collection is still on hard disk drive and takes place.

Participants:

 Description   

Database size does not change upon collection's removal.
It also occupies hard disk.
Only database drop can free hard disk space.



 Comments   
Comment by Asya Kamsky [ 31/Aug/15 ]

miholeus this is expected behavior and it's documented as such: http://docs.mongodb.org/v3.0/faq/storage/#empty-records

Generated at Thu Feb 08 03:53:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.