[SERVER-8600] improve handling of non-fsyncable directories Created: 16/Feb/13 Updated: 27/Oct/15 Resolved: 27/Sep/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.5.3 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Eric Milkie | Assignee: | Matt Dannenberg |
| Resolution: | Done | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
If you attempt to use MongoDB with e.g. an HGFS mount as the data directory, you may see an fassert on startup:
This typically indicates the use of a device that does not support fsyncing on directories. We should handle this error (EINVAL) better:
|
| Comments |
| Comment by auto [ 27/Sep/13 ] | ||||||
|
Author: {u'username': u'dannenberg', u'name': u'matt dannenberg', u'email': u'matt.dannenberg@10gen.com'}Message: | ||||||
| Comment by Eric Milkie [ 20/Sep/13 ] | ||||||
|
VirtualBox shared folders may be another unsupported filesystem. | ||||||
| Comment by Eric Milkie [ 25/Mar/13 ] | ||||||
|
Refined plan: | ||||||
| Comment by Andrew Emil (Inactive) [ 22/Mar/13 ] | ||||||
|
I looked back over the locations I mentioned: As far as I can tell util/paths.h is the only place that we fsync a directory, so it seems you are right that we may only need to log a message in a single place. I will update this ticket after I do some testing with HGFS. | ||||||
| Comment by Eric Milkie [ 21/Mar/13 ] | ||||||
|
I think we only need to concern ourselves with fsyncing directories. This ticket does not concern fsyncing of files. Some of the code locations in your list are only for the fsyncing of files. We need to confirm that the fsyncing of a directory is not required for correct server operation (I believe it is). | ||||||
| Comment by Andrew Emil (Inactive) [ 21/Mar/13 ] | ||||||
|
Looked over this ticket: there are only a few places that we really call fsync (or fdatasync), so it seems very possible to add in checks in those places, particularly if we still want to abort but also give suggestions about correcting the issue. Not sure what the warning or info message should be, but it seems like the code will look like:
My question is what the message should be here. For example, this could be added in to path.h, where the assertion referenced in the ticket description comes from, but it does not seem useful: log() << “Directory ‘“ << dir.string() << “‘ is not fsyncable, is it a temporary directory?” << endl; Places where we call fsync or fdatasync: |