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

Fix receive and send when multiple db chunks are involved #182

Closed danielealbano closed 2 years ago

danielealbano commented 2 years ago

This PR fixes an issue triggered by how streams larger than 64kb are stored in the database and also adjust the size of the buffers.

The PR also improves how data are sent when multiple chunks have to be streamed, now the chunks are properly split depending on the size of the send buffer instead of requiring the send buffer to be the size of the data to be sent.

codecov[bot] commented 2 years ago

Codecov Report

Merging #182 (4416046) into main (fa0b8ae) will increase coverage by 0.65%. The diff coverage is 64.71%.

@@            Coverage Diff             @@
##             main     #182      +/-   ##
==========================================
+ Coverage   78.76%   79.41%   +0.65%     
==========================================
  Files         105      105              
  Lines        6776     6795      +19     
==========================================
+ Hits         5337     5396      +59     
+ Misses       1439     1399      -40     
Impacted Files Coverage Δ
src/module/prometheus/module_prometheus.c 91.53% <ø> (ø)
src/module/redis/module_redis.c 82.39% <ø> (+0.70%) :arrow_up:
src/random.c 100.00% <ø> (ø)
src/network/network.c 83.33% <53.33%> (+7.78%) :arrow_up:
src/module/redis/module_redis_command.c 73.42% <60.00%> (+7.22%) :arrow_up:
src/storage/db/storage_db.c 58.69% <70.00%> (+1.45%) :arrow_up:
src/module/redis/module_redis_command.h 77.36% <100.00%> (+1.89%) :arrow_up:
src/slab_allocator.c 94.94% <100.00%> (+0.06%) :arrow_up:
... and 3 more

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