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

Implement Redis config get command #410

Closed danielealbano closed 1 year ago

danielealbano commented 1 year ago

This PR implements the Redis CONFIG and CONFIG GET commands, although the config command is just empty as it's a container and returns an error when invoked.

As CONFIG GET is the GET command within the CONFIG container and cachegrand doesn't support the latter, the PR implements all the necessary logic to support commands in within containers.

The CONFIG GET returns all the keys that Redis returns but most of the values are "fake" and only a few ones are actually mapped to the internal cachegrand values, most of these are Redis specific and others are for features that haven't been implemented yet.

The CONFIG GET command supports both the protocols version 2 and 3.

The PR doesn't contain tests for the CONFIG GET command, will be introduced with a separated PR.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 8.37% and project coverage change: -1.19 :warning:

Comparison is base (fce1d38) 77.98% compared to head (e2e9007) 76.79%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #410 +/- ## ========================================== - Coverage 77.98% 76.79% -1.19% ========================================== Files 196 198 +2 Lines 13319 13539 +220 ========================================== + Hits 10386 10397 +11 - Misses 2933 3142 +209 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `76.79% <8.37%> (-1.19%)` | :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://app.codecov.io/gh/danielealbano/cachegrand/pull/410?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano) | Coverage Δ | | |---|---|---| | [...le/redis/command/module\_redis\_command\_config\_get.c](https://app.codecov.io/gh/danielealbano/cachegrand/pull/410?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL21vZHVsZS9yZWRpcy9jb21tYW5kL21vZHVsZV9yZWRpc19jb21tYW5kX2NvbmZpZ19nZXQuYw==) | `0.00% <0.00%> (ø)` | | | [src/worker/network/worker\_network\_op.c](https://app.codecov.io/gh/danielealbano/cachegrand/pull/410?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL3dvcmtlci9uZXR3b3JrL3dvcmtlcl9uZXR3b3JrX29wLmM=) | `69.44% <ø> (ø)` | | | [...mmand/helpers/module\_redis\_command\_helper\_config.c](https://app.codecov.io/gh/danielealbano/cachegrand/pull/410?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL21vZHVsZS9yZWRpcy9jb21tYW5kL2hlbHBlcnMvbW9kdWxlX3JlZGlzX2NvbW1hbmRfaGVscGVyX2NvbmZpZy5j) | `1.44% <1.44%> (ø)` | | | [src/module/redis/module\_redis\_connection.c](https://app.codecov.io/gh/danielealbano/cachegrand/pull/410?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL21vZHVsZS9yZWRpcy9tb2R1bGVfcmVkaXNfY29ubmVjdGlvbi5j) | `74.51% <50.00%> (-2.66%)` | :arrow_down: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/danielealbano/cachegrand/pull/410/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)

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