summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/storage_engine_lock_file.cpp
diff options
context:
space:
mode:
authorGregory Wlodarek <gregory.wlodarek@mongodb.com>2020-04-24 14:16:31 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-04-27 23:44:41 +0000
commit06755cd5a43d08b5e1e9163e060177d728ae6696 (patch)
tree9e0c09b02e91e565a4658c34a16f2e51debab5ea /src/mongo/db/storage/storage_engine_lock_file.cpp
parent404e44ce81b762db8ceee31df8e5b344f717e6a5 (diff)
downloadmongo-06755cd5a43d08b5e1e9163e060177d728ae6696.tar.gz
SERVER-46398 Expand the data directory not found message on startup to be more informative
Diffstat (limited to 'src/mongo/db/storage/storage_engine_lock_file.cpp')
-rw-r--r--src/mongo/db/storage/storage_engine_lock_file.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/storage/storage_engine_lock_file.cpp b/src/mongo/db/storage/storage_engine_lock_file.cpp
index 4c67d761f13..ff82910244d 100644
--- a/src/mongo/db/storage/storage_engine_lock_file.cpp
+++ b/src/mongo/db/storage/storage_engine_lock_file.cpp
@@ -34,6 +34,7 @@
#include "mongo/db/storage/storage_engine_lock_file.h"
#include "mongo/platform/process_id.h"
+#include "mongo/util/str.h"
namespace mongo {
namespace {
@@ -55,4 +56,11 @@ Status StorageEngineLockFile::writePid() {
return writeString(pidStr);
}
+std::string StorageEngineLockFile::_getNonExistentPathMessage() const {
+ return str::stream() << "Data directory " << _dbpath
+ << " not found. Create the missing directory or specify another path "
+ "using (1) the --dbpath command line option, or (2) by adding the "
+ "'storage.dbPath' option in the configuration file.";
+}
+
} // namespace mongo