grobian / carbon-c-relay

Enhanced C implementation of Carbon relay, aggregator and rewriter
Apache License 2.0
380 stars 107 forks source link

Dispatcher can lost some metrics on connection with compression #394

Closed msaf1980 closed 4 months ago

msaf1980 commented 4 years ago

In completion of https://github.com/grobian/carbon-c-relay/pull/387

I add a tests for gzip/lz4 input streams and fixed gzip buffering.

https://github.com/msaf1980/carbon-c-relay/tree/fix_dispatcher_compress

Some fix for lz4 - run LZ4F_resetDecompressionContext after error (see http://htmlpreview.github.io/?https://github.com/lz4/lz4/blob/dev/doc/lz4frame_manual.html). May be after incomplete frame received. Problems - it's added in lz4 1.8. So fixed version not builded on production systems (RHEL 7 and clones, Debian 9 and Ubuntu Stable). And work on Fedora and Debian 10.

I'll try find a resolution. And do some regression tests for stability check.