grobian / carbon-c-relay

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

Tagged metrics dropped during aggregation #400

Open Pavel-R opened 4 years ago

Pavel-R commented 4 years ago

Variable firstspace garbaged with metric tags. https://github.com/grobian/carbon-c-relay/blob/4ecb19330f063ca8d851066834a82f9a5caf0787/dispatcher.c#L976

Later in aggregator variables val and epoh calculated incorrectly. Val is almost always 0 and 'epoh' takes value of metric as timestamp. At best, the metric is discarded, but in some cases it may be stored incorrectly.