Open GoogleCodeExporter opened 9 years ago
Seems to be working for me on linux. On what platform are you seeing it?
You would see this behavior if you created a leveldb instance with 1.14.0 but
tried to delete it with a previous version. Any chance that's what happened?
(Sorry, I know nothing about node.js so don't know how possible that could be.)
Original comment by dgrogan@chromium.org
on 9 Oct 2013 at 7:54
I'll try and narrow down a small piece of code to reproduce what I'm seeing.
Original comment by rod.v...@xprime.com.au
on 12 Oct 2013 at 1:47
OK, so DestroyDB() works OK except when you run RepairDB before it, so perhaps
this is a repair problem?
Try this and it'll delete everything but end up with a "lost" directory.
<code language="c++">
#include <leveldb/db.h>
#include <stdio.h>
int main (int argc, char** argv) {
leveldb::DB* db;
leveldb::Options options;
options.create_if_missing = true;
leveldb::Status status = leveldb::DB::Open(options, "/tmp/testdb", &db);
char key [10];
for (int i = 0; i < 200000; i++) {
sprintf(key, "%d key", i);
db->Put(leveldb::WriteOptions(), key, "some long string used to fill up more than one sst");
}
delete db;
leveldb::RepairDB("/tmp/testdb", leveldb::Options());
leveldb::DestroyDB("/tmp/testdb", leveldb::Options());
}
</code>
Original comment by rod.v...@xprime.com.au
on 22 Oct 2013 at 4:41
Original issue reported on code.google.com by
rod.v...@xprime.com.au
on 9 Oct 2013 at 8:12