mirror of
https://github.com/typesense/typesense.git
synced 2025-05-20 05:32:30 +08:00
Log a more meaningful error message and exit when another instance is started off the same data directory.
This commit is contained in:
parent
457bbcf467
commit
4d53a62784
@ -74,6 +74,13 @@ public:
|
||||
|
||||
if(!s.ok()) {
|
||||
LOG(ERR) << "Error while initializing store: " << s.ToString();
|
||||
if(s.code() == rocksdb::Status::Code::kIOError) {
|
||||
LOG(ERR) << "It seems like the data directory " << state_dir_path << " is already being used by "
|
||||
<< "another Typesense server. ";
|
||||
LOG(ERR) << "If you are SURE that this is not the case, delete the LOCK file "
|
||||
<< "in the data directory and try again.";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
assert(s.ok());
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "core_api.h"
|
||||
#include "typesense_server_utils.h"
|
||||
#include <curl/curl.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
HttpServer* server;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user