feat(lsm): track entry idx file offset
This commit is contained in:
parent
715e1f9a58
commit
2f58d1ee48
4 changed files with 17 additions and 17 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue