leveldb can just use one process to open,if you use other process to open,it will report lock file is held.
if you read the source code,you can find db_impl.cc file,Status DBImpl::Recover(VersionEdit* edit, bool *save_manifest) method,
Status s = env_->LockFile(LockFileName(dbname_), &db_lock_);
if (!s.ok()) {
std::cout << s.ToString();
return s;
}
it check whether lock file is held.
在 2014年12月19日星期五 UTC+8下午11:57:26,Eddy Ilg写道: