Closed danielealbano closed 1 year ago
Base: 81.89% // Head: 82.20% // Increases project coverage by +0.31%
:tada:
Coverage data is based on head (
9768af6
) compared to base (5f38ef2
). Patch coverage: 96.06% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
This PR introduces an initial version of an epoch garbage collector [1], which is a corner stone for the new iteration of the internal KeyValue database.
The epoch garbage collector works on a very simple principle:
There are currently 4 different object types but this might change down the line.
The epoch gc uses a double linked list for the threads, that requires a spinlock when is used, and uses a double linked list of ring bounded spsc to stage the pointers to clean up, the list is expanded only when the current ring is full of staged pointers that can't be deleted.
Pointers are traced only when they are submitted for deletion, not before, to avoid overloading the system for no reason.
[1] https://en.wikipedia.org/wiki/Garbage_collection_(computer_science)