-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Open
Description
levelDB 1.22
windows 10 x64
levelDB is throwing above mentioned error.
We use a C# wrapper for a unity project, where this is the case nearly 100% of the time, but it can be reproduced by this code:
#include <iostream>
#include <cassert>
#include "leveldb/db.h"
#include "leveldb/env.h"
int main()
{
std::cout << "Hello World!\n";
for (int i = 0; i < 50; ++i) {
leveldb::DB* db;
leveldb::Options options;
options.create_if_missing = true;
leveldb::Status status = leveldb::DB::Open(options, "...somepath....\\TESTDIR", &db);
assert(status.ok());
std::string value;
status = db->Put(leveldb::WriteOptions(), "key123", "5");
assert(status.ok());
status = db->Get(leveldb::ReadOptions(), "key123", &value);
assert(status.ok());
assert(value.compare("5") == 0);
std::cout << value;
status = db->Delete(leveldb::WriteOptions(), "key123");
assert(status.ok());
delete db;
}
}
the error happens on leveldb::DB::Open
and a stacktrace would be:
leveldb::DB::Open
> VersionSet::LogAndApply
> SetCurrentFile
> env_windows.cc RenameFile
line 542 return WindowsError(src, replace_error);
where the replace error with code 1175 is returned
src = TESTDIR/LOG
target = TESTDIR/LOG.old
this is also the case for alternating folder names:
std::stringstream ss;
ss << "C:\\Users\\boliver\\Documents\\leveldb\\MyOwnTest\\TESTDIR";
ss << i;
leveldb::Status status = leveldb::DB::Open(options, ss.str(), &db);
the error also appears when running the benchmarks
Metadata
Metadata
Assignees
Labels
No labels