feat(lsm): track entry idx file offset

This commit is contained in:
Jef Roosens 2023-11-09 21:32:39 +01:00
parent 715e1f9a58
commit 2f58d1ee48
Signed by: Jef Roosens
GPG key ID: 02D4C0997E74717B
4 changed files with 17 additions and 17 deletions

View file

@ -252,19 +252,12 @@ lsm_error lsm_trie_remove(void **data, lsm_trie *trie, lsm_str *key) {
return lsm_error_not_found;
}
// Child is the node we wish to delete
if (data != NULL) {
*data = child->data;
}
child->data = NULL;
// We only remove child if it has no children of its own
if (lsm_bt_size(&child->bt) == 0) {
lsm_bt_remove(NULL, &parent->bt, c);
lsm_trie_node_free(child);
}
trie->size--;
return lsm_error_ok;