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 #387

Closed msaf1980 closed 5 years ago

msaf1980 commented 5 years ago

Tests and gzipread trivial fix for https://github.com/grobian/carbon-c-relay/issues/386

msaf1980 commented 5 years ago

For temporary fix this issue, i add some re-read from buffers. It's not elegant, because require add new function with only decompress data from buffer. Also some performance penalty when in gzipreadbuf memmove called when inflate success.

msaf1980 commented 5 years ago

Need some reorg. Maybe tests in additional pull requests

grobian commented 5 years ago

I took your added gzip/ssl/lz4 tests, and fixed the gzip buffering issue.

msaf1980 commented 5 years ago

I planned add tests for ssl/gzip/lz4 streams with sendmetric and write a fix for gzip/lz4 streams. Snappy is unusable now and need to be switched to framed format due https://github.com/grobian/carbon-c-relay/issues/349 ?

grobian commented 5 years ago

Yes, snappy is crappy. I wonder if it wouldn't be better to drop it altogether and look at zstd instead.