CompactRange(): Try to remove non existing ldb files
- Dominant language
- C++
- Stars
- 39.4k
- Forks
- 8.2k
- PR merge metrics
- No merged PRs in 30d
Description
Hi !
When running a strace on my project, I observed that LevelDB try to delete ldb files that doesn't exists each time I use CompactRange().
Here is a sample of code that trigger the issue.
```c++
#include
#include "leveldb/db.h"
int main(void) {
leveldb::DB* db;
leveldb::Options options;
options.create_if_missing = true;
leveldb::Status status = leveldb::DB::Open(options, "/tmp/testdb", &db);
assert(status.ok());
db->CompactRange(NULL, NULL);
}
```
When running it with "strace -f" I catch this line:
```
...
[pid 31575] unlink("/tmp/testdb/000005.ldb") = -1 ENOENT (No such file or directory)
...
```
I mainly wanted to know if it is a wanted/normal behaviour of a compaction, as it doesn't seems to happen when it is a not forced compaction.
Cheers !
Contributor guide
Assessment
This issue has not been assessed yet.