danielealbano / cachegrand

cachegrand - a modern data ingestion, processing and serving platform built for today's hardware
BSD 3-Clause "New" or "Revised" License
975 stars 34 forks source link

Refactor small circular buffer #254

Closed danielealbano closed 1 year ago

danielealbano commented 1 year ago

In preparation to implement the epoch based garbage collector, as it will rely on being able to peek & dequeue from a different thread, this PR refactor the small circular buffer to:

The data structure has also been renamed to ring unbounded to be more high level.

codecov[bot] commented 1 year ago

Codecov Report

Base: 81.88% // Head: 81.87% // Decreases project coverage by -0.01% :warning:

Coverage data is based on head (3a00d51) compared to base (268e23f). Patch coverage: 89.23% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #254 +/- ## ========================================== - Coverage 81.88% 81.87% -0.01% ========================================== Files 153 153 Lines 9415 9421 +6 ========================================== + Hits 7709 7713 +4 - Misses 1706 1708 +2 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `81.87% <89.23%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/danielealbano/cachegrand/pull/254?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano) | Coverage Δ | | |---|---|---| | [src/module/prometheus/module\_prometheus.c](https://codecov.io/gh/danielealbano/cachegrand/pull/254/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL21vZHVsZS9wcm9tZXRoZXVzL21vZHVsZV9wcm9tZXRoZXVzLmM=) | `91.67% <ø> (ø)` | | | [...nd/helpers/module\_redis\_command\_helper\_incr\_decr.c](https://codecov.io/gh/danielealbano/cachegrand/pull/254/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL21vZHVsZS9yZWRpcy9jb21tYW5kL2hlbHBlcnMvbW9kdWxlX3JlZGlzX2NvbW1hbmRfaGVscGVyX2luY3JfZGVjci5j) | `85.90% <ø> (ø)` | | | [...module/redis/command/module\_redis\_command\_append.c](https://codecov.io/gh/danielealbano/cachegrand/pull/254/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL21vZHVsZS9yZWRpcy9jb21tYW5kL21vZHVsZV9yZWRpc19jb21tYW5kX2FwcGVuZC5j) | `78.82% <ø> (ø)` | | | [...c/module/redis/command/module\_redis\_command\_copy.c](https://codecov.io/gh/danielealbano/cachegrand/pull/254/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL21vZHVsZS9yZWRpcy9jb21tYW5kL21vZHVsZV9yZWRpc19jb21tYW5kX2NvcHkuYw==) | `77.08% <ø> (ø)` | | | [...module/redis/command/module\_redis\_command\_dbsize.c](https://codecov.io/gh/danielealbano/cachegrand/pull/254/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL21vZHVsZS9yZWRpcy9jb21tYW5kL21vZHVsZV9yZWRpc19jb21tYW5kX2Ric2l6ZS5j) | `100.00% <ø> (ø)` | | | [...c/module/redis/command/module\_redis\_command\_decr.c](https://codecov.io/gh/danielealbano/cachegrand/pull/254/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL21vZHVsZS9yZWRpcy9jb21tYW5kL21vZHVsZV9yZWRpc19jb21tYW5kX2RlY3IuYw==) | `100.00% <ø> (ø)` | | | [...module/redis/command/module\_redis\_command\_decrby.c](https://codecov.io/gh/danielealbano/cachegrand/pull/254/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL21vZHVsZS9yZWRpcy9jb21tYW5kL21vZHVsZV9yZWRpc19jb21tYW5kX2RlY3JieS5j) | `100.00% <ø> (ø)` | | | [...rc/module/redis/command/module\_redis\_command\_del.c](https://codecov.io/gh/danielealbano/cachegrand/pull/254/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL21vZHVsZS9yZWRpcy9jb21tYW5kL21vZHVsZV9yZWRpc19jb21tYW5kX2RlbC5j) | `100.00% <ø> (ø)` | | | [...module/redis/command/module\_redis\_command\_exists.c](https://codecov.io/gh/danielealbano/cachegrand/pull/254/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL21vZHVsZS9yZWRpcy9jb21tYW5kL21vZHVsZV9yZWRpc19jb21tYW5kX2V4aXN0cy5j) | `100.00% <ø> (ø)` | | | [...module/redis/command/module\_redis\_command\_expire.c](https://codecov.io/gh/danielealbano/cachegrand/pull/254/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL21vZHVsZS9yZWRpcy9jb21tYW5kL21vZHVsZV9yZWRpc19jb21tYW5kX2V4cGlyZS5j) | `94.87% <ø> (ø)` | | | ... and [62 more](https://codecov.io/gh/danielealbano/cachegrand/pull/254/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.