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 getrange and setrange #198

Closed danielealbano closed 2 years ago

danielealbano commented 2 years ago

This PR implements the GETRANGE and SETRANGE commands.

Although it should have been in a separated PR, this one also includes some refactoring for the spsc hashtable to properly implement and distinguish case sensitive vs case insensitive get/set/delete operations.

lgtm-com[bot] commented 2 years ago

This pull request introduces 1 alert when merging 7a806de75619ffd4f5318beb01f971eecfe81216 into 1b86f3e9d618c6042352e04835504af94b738389 - view on LGTM.com

new alerts:

codecov[bot] commented 2 years ago

Codecov Report

Merging #198 (45af5ab) into main (1b86f3e) will increase coverage by 0.35%. The diff coverage is 88.31%.

@@            Coverage Diff             @@
##             main     #198      +/-   ##
==========================================
+ Coverage   80.41%   80.76%   +0.35%     
==========================================
  Files         127      129       +2     
  Lines        7553     7759     +206     
==========================================
+ Hits         6073     6266     +193     
- Misses       1480     1493      +13     
Impacted Files Coverage Δ
src/storage/db/storage_db.c 63.29% <60.00%> (+1.53%) :arrow_up:
...dule/redis/command/module_redis_command_setrange.c 83.50% <83.50%> (ø)
src/module/redis/module_redis_command.h 83.05% <85.71%> (-0.59%) :arrow_down:
src/module/redis/module_redis_command.c 81.10% <88.00%> (+0.87%) :arrow_up:
...dule/redis/command/module_redis_command_getrange.c 93.10% <93.10%> (ø)
...rc/data_structures/hashtable/spsc/hashtable_spsc.c 94.51% <93.55%> (-0.81%) :arrow_down:
...rc/data_structures/hashtable/spsc/hashtable_spsc.h 100.00% <100.00%> (ø)
src/hash/hash_fnv1.h 100.00% <100.00%> (ø)
src/module/redis/module_redis.c 82.39% <100.00%> (ø)
src/module/redis/module_redis_commands.c 89.47% <100.00%> (ø)
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.