[SERVER-14871] Better error message for FileAllocator failure Created: 12/Aug/14  Updated: 06/Dec/22  Resolved: 16/Nov/16

Status: Closed
Project: Core Server
Component/s: Diagnostics, Storage
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Ramon Fernandez Marina Assignee: Backlog - Storage Execution Team
Resolution: Done Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-14869 Mongodb crashes without log after cre... Closed
Assigned Teams:
Storage Execution
Participants:

 Description   

In database_holder.cpp we have the following code:

        if (txn->lockState()->isWriteLocked() && FileAllocator::get()->hasFailed()) {
            uassert(17507, "Can't take a write lock while out of disk space", false);
        }

If FileAllocator may fail for other reasons (e.g.: the dbpath is on a network drive and there was a network problem) then this message is misleading.

Something like "Can't take a write lock: FileAllocator failed" would be a better message; if we could provide more info about the failure somehow, that would be even better.



 Comments   
Comment by Eric Milkie [ 16/Nov/16 ]

Code has been rewritten.

Comment by Valeri Karpov [ 16/Sep/14 ]

I ran into this the other day. Would definitely be helpful to have 2 things:

1) Log the database that the FileAllocator failed on, because sometimes you have a database on a separate file system.
2) Make a more informed guess as to why the FileAllocator failed. For instance, if the permissions on one of your files are such that you can't write, you'll get this "out of disk space" error. Might make sense to have separate error codes for "couldn't write because of a permissions error" vs "you're really out of disk space"

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