facebook / facebook/rocksdb

Loading options from map mentions wrong options

Open
#6,065 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
32.1k
Forks
6.9k
Avg merge
32m
Merged PRs (30d)
1

Description

### Expected behavior
When i load a map with config values, and one of those has a typo/unknown key, RocksDB lets me know there is something wrong with the map in a more meaningful manner.

Example: `DBOptions found unexpected key: "avoid_unecesary_blocking_io"` (typo)
Or, a parameter which will be filled with an error message, or `DBOptions.printErrors()`. Anything :D

If you have a lot of options, it makes it hard to find the culprit

### Actual behavior
DBOptions returns null instead of a DBOptions object

### Steps to reproduce the behavior
for Java:

```
// my file contains a typo on one line, but all other options are correct
Map map = loadDBOptionsFromMyFileSomewhere();
DBOptions options = DBOptions.getDBOptionsFromProps(map.get("DBOptions"));

if (options == null){
System.out.println("Failed loading DBOptions")
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.