There are some things I don't understand in the code interface reading
Opened this issue · 2 comments
The performance of kvell is much better than rocksdb, which makes me interested in learning this project. When I was reading your paper, I saw in the implementation part of the paper that kvell implements the same interface as LSM-Tree:(writes Update(k,v), reads Get(k), and range scans Scan(k1,k2). Update(k,v) associates valuev to key k. Update(k,v) only returns once the value has been persisted to disk.). But when I started to read the code, I did not find these functions. Can you tell me where or alias these interfaces appear in the code? thank you very much!
KVell uses an asynchronous interface for read/update/scan. Here is how to perform an update:
static void callback(struct slab_callback *cb, void *item) {
// update is complete when this function is called
}
struct slab_callback *cb = new_slab_callback();
cb->cb = callback;
cb->item = create_unique_item(1024, 10); // create an item of 1KB with key 10 and value 10
kv_update_async(cb); // Start the update; the function is non blocking.
See https://github.com/BLepers/KVell/blob/master/workload-ycsb.c for an example of read and scan.
Thank you very much for your answer, I am planning to read your code completely! ~ Unfortunately, I ran into another problem today. I used three device(actually three partitions of one block device) to run run-aws.sh script, but when I observed the background, I found that this program would probably take up 30G of my memory. And it happened that my server only had 30G, so there was an error of out of memory. Is there any way to check or modify the code to reduce the occupied memory? (I tried reducing the size of the three partitions, but it didn't help)