feat(lander): integrate persistent insert & get lsm store
This commit is contained in:
parent
226873219b
commit
535b92a6b6
8 changed files with 63 additions and 19 deletions
|
|
@ -100,6 +100,9 @@ lsm_error lsm_entry_sync(lsm_store *store, lsm_entry_handle *handle) {
|
|||
res = lsm_entry_write_uint64_t(store->idx_file, new_block_count);
|
||||
|
||||
if (res == lsm_error_ok) {
|
||||
// Only if we successfully updated the on-disk counter do we make the code
|
||||
// aware that the file's size has increased. This way, if a write to the
|
||||
// counter fails, the code will simply reuse the already written content.
|
||||
store->idx_file_size += entry_size;
|
||||
store->idx_file_block_count = new_block_count;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue