Skip to content

support deletion #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 14 commits into from
Closed

support deletion #101

wants to merge 14 commits into from

Conversation

ctero-graham
Copy link
Contributor

Deletion is support in two ways: markDelete and recycle.

By markDeleted, a deleted flag is set at the higher 8 bits of the link size at level 0, no extra memory needed, the drawback is that the size of the links will be limited to 24bits, however, large enough in almost cases.

By recycle(now named recycle_in_test), all the nodes marked deletion will be kicked out, the slots they occupied will be recorded in a similar way to linked list, by adding two vars: reusable_entry / reusable_tail, and reusing the memory for label to store the next.

recycle should be used after some "markDeleted"s, for a small number of deletion, only markDeleted would be enough, it depends on the scenario how to combine with recycle.

I did some testing, it seems ok for markDeleted, but not that sure for recycle.

@vinnitu
Copy link
Contributor

vinnitu commented Aug 21, 2019

hm, I don't see recycle method

@yurymalkov
Copy link
Member

@vinnitu
There is no recycle in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants