[DOCS-4097] Oplog resize can cause out of disk space Created: 29/Sep/14  Updated: 11/Jan/17  Resolved: 27/Jul/16

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Bug Priority: Major - P3
Reporter: Kevin Pulo Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-9489 Recreating a dropped capped collectio... Closed
Participants:
Days since reply: 9 years, 20 weeks, 3 days ago

 Description   

In the presence of SERVER-9489 (which affects a wide range of MongoDB versions), the instructions to resize the oplog are fragile and can easily cause an out of disk space condition. This is because users expect the space from the old oplog to be reused, and so often plan for this when sizing the new oplog. If the new size of the capped collection is a large fraction of the disk volume size (ie. larger than the available free disk space), then the createCollection({capped:true, size: ...}) will fail.

I suggest that a more robust approach is to drop the entire local db, since this is safe to do (the other collections will be automatically re-created and re-populated when the mongod is brought back up in the replset) and avoids any space reuse problems from SERVER-9489. However, this does require more care around saving the final oplog entry into a separate, different, unused temporary database which is then later dropped before the member is returned to the replset.


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