Statsd: erroneous reporting; aggregators not reset between worker's runs

Description

Since our upgrade to v18 (18.0.2) most of our statsd reports are erroneous. It seems that the aggregators are not reset between worker's runs as aggregating only 0s gives a non zero result. Log extract:
2016-12-08 12:20:00,182 DEBUG [Statsd_Worker-3] o.o.n.d.s.DefaultResourceDao: getChildResource: returning resource node[48].interfaceSnmp[GigabitEthernet1_0
_19-b8af67ebdf30]
2016-12-08 12:20:00,182 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,183 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,184 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,184 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,184 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,184 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,184 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,184 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,184 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,184 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,184 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,184 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,184 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,184 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: Aggregating: 0.0
2016-12-08 12:20:00,184 DEBUG [Statsd_Worker-3] o.o.n.d.s.RrdStatisticAttributeVisitor: The value of node[48].interfaceSnmp[GigabitEthernet1_0_19-b8af67ebdf30].LateCollision is 13051.472376542602

Acceptance / Success Criteria

None

Attachments

2

Lucidchart Diagrams

Activity

Show:

jmk March 14, 2017 at 8:50 AM

Ok. Thanks.

fooker February 8, 2017 at 8:51 AM

I've reworked the patch a little bit and added an according unit test.

PR: https://github.com/OpenNMS/opennms/pull/1218

jmk January 5, 2017 at 2:12 PM

Added Foundation 2016 to affected versions...

jmk January 3, 2017 at 6:29 AM

jmk January 3, 2017 at 6:10 AM

@Ronny : thanks for the branch. However I wonder what step I should take next. Am I supposed to fork this new branch and then submit it as a pull request ?

Fixed

Details

Assignee

Reporter

Components

Sprint

Priority

PagerDuty

Created December 8, 2016 at 7:42 PM
Updated March 14, 2017 at 8:50 AM
Resolved February 9, 2017 at 8:34 AM