[SERVER-31419] Don't go up one too many directories when flushing storage.bson's directory. Created: 05/Oct/17  Updated: 30/Oct/23  Resolved: 06/Oct/17

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 3.6.0-rc0

Type: Bug Priority: Major - P3
Reporter: Daniel Gottlieb (Inactive) Assignee: Daniel Gottlieb (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Storage 2017-10-23
Participants:
Linked BF Score: 0

 Description   

After renaming a file in place, the dbpath directory must also be flushed before a rename is durable. After renaming the storage.bson file, the dbpath's parent is accidentally being flushed. This provides the durability guarantee, but the mongod process may not have permissions to do so. This results in an exception crashing mongod.

Problematic verbose log line when starting on the default dbpath of /data/db/:

2017-10-05T14:18:52.806-0400 D STORAGE  [initandlisten] flushing directory /data

The fixed version:

2017-10-05T14:21:39.449-0400 D STORAGE  [initandlisten] flushing directory /data/db



 Comments   
Comment by Githook User [ 06/Oct/17 ]

Author:

{'email': 'daniel.gottlieb@mongodb.com', 'name': 'Daniel Gottlieb', 'username': 'dgottlieb'}

Message: SERVER-31419: Flush the appropriate directory after renaming storage.bson.
Branch: master
https://github.com/mongodb/mongo/commit/1ecee40289f01bae7990b5715a893a152432dc5f

Generated at Thu Feb 08 04:27:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.