-
-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
tree.get
function seems using prefix to match key.
Here is my code:
let folder = "";
// A tree is a single physical keyspace/index/...
// and supports a BTreeMap-like API
// but all data is persisted to disk.
let tree = Config::new(folder).open().unwrap();
// Note compared to the BTreeMap API, operations return a Result<T>
// So you can handle I/O errors if they occur
tree.insert("hello-key-999991", "hello-value-999991")
.unwrap();
let item = tree.get("hello-key-99999").unwrap();
match item {
Some(value) => {
println!("value: {}", std::str::from_utf8(&value).unwrap());
}
None => println!("Not Found"),
}
// Flush to definitely make sure data is persisted
tree.flush().unwrap();
Expect Not Found, but printed value: hello-value-999991
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working