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

Feat rdb loading #324

Closed danielealbano closed 1 year ago

danielealbano commented 1 year ago

This PR implements the ability to load simple RDB snapshots, it supports most of the common opcodes and only the value type string.

The maximum supported version number is 11, although not that it really matters as only strings are supported.

List of opcodes supported

List of value types supported:

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 9.77% and project coverage change: -1.40 :warning:

Comparison is base (8fba57a) 78.61% compared to head (fee8a9d) 77.22%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #324 +/- ## ========================================== - Coverage 78.61% 77.22% -1.40% ========================================== Files 174 176 +2 Lines 12110 12351 +241 ========================================== + Hits 9520 9537 +17 - Misses 2590 2814 +224 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `77.22% <9.77%> (-1.40%)` | :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/324?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano) | Coverage Δ | | |---|---|---| | [...module/redis/snapshot/module\_redis\_snapshot\_load.c](https://codecov.io/gh/danielealbano/cachegrand/pull/324?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL21vZHVsZS9yZWRpcy9zbmFwc2hvdC9tb2R1bGVfcmVkaXNfc25hcHNob3RfbG9hZC5j) | `0.00% <0.00%> (ø)` | | | [src/program.c](https://codecov.io/gh/danielealbano/cachegrand/pull/324?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL3Byb2dyYW0uYw==) | `28.41% <ø> (+0.16%)` | :arrow_up: | | [.../worker/fiber/worker\_fiber\_storage\_db\_initialize.c](https://codecov.io/gh/danielealbano/cachegrand/pull/324?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL3dvcmtlci9maWJlci93b3JrZXJfZmliZXJfc3RvcmFnZV9kYl9pbml0aWFsaXplLmM=) | `73.33% <62.50%> (-26.67%)` | :arrow_down: | | [src/epoch\_gc\_worker.c](https://codecov.io/gh/danielealbano/cachegrand/pull/324?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL2Vwb2NoX2djX3dvcmtlci5j) | `94.12% <100.00%> (ø)` | | | [src/memory\_allocator/ffma.c](https://codecov.io/gh/danielealbano/cachegrand/pull/324?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL21lbW9yeV9hbGxvY2F0b3IvZmZtYS5j) | `94.70% <100.00%> (+0.08%)` | :arrow_up: | | [...fiber/worker\_fiber\_storage\_db\_gc\_deleted\_entries.c](https://codecov.io/gh/danielealbano/cachegrand/pull/324?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL3dvcmtlci9maWJlci93b3JrZXJfZmliZXJfc3RvcmFnZV9kYl9nY19kZWxldGVkX2VudHJpZXMuYw==) | `87.50% <100.00%> (+4.17%)` | :arrow_up: | | [...rker/fiber/worker\_fiber\_storage\_db\_keys\_eviction.c](https://codecov.io/gh/danielealbano/cachegrand/pull/324?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL3dvcmtlci9maWJlci93b3JrZXJfZmliZXJfc3RvcmFnZV9kYl9rZXlzX2V2aWN0aW9uLmM=) | `33.33% <100.00%> (+4.76%)` | :arrow_up: | | [...orker/fiber/worker\_fiber\_storage\_db\_snapshot\_rdb.c](https://codecov.io/gh/danielealbano/cachegrand/pull/324?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL3dvcmtlci9maWJlci93b3JrZXJfZmliZXJfc3RvcmFnZV9kYl9zbmFwc2hvdF9yZGIuYw==) | `34.38% <100.00%> (+4.38%)` | :arrow_up: | | [src/worker/worker.c](https://codecov.io/gh/danielealbano/cachegrand/pull/324?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL3dvcmtlci93b3JrZXIuYw==) | `81.25% <100.00%> (+0.46%)` | :arrow_up: | | [src/worker/worker\_context.h](https://codecov.io/gh/danielealbano/cachegrand/pull/324?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL3dvcmtlci93b3JrZXJfY29udGV4dC5o) | `100.00% <100.00%> (ø)` | | ... and [5 files with indirect coverage changes](https://codecov.io/gh/danielealbano/cachegrand/pull/324/indirect-changes?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 in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.