feat(lander): integrate persistent insert & get lsm store

This commit is contained in:
Jef Roosens 2023-11-08 11:19:33 +01:00
parent 226873219b
commit 535b92a6b6
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
8 changed files with 63 additions and 19 deletions

View file

@ -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;
}