rule router default behavior is not behaving as expected

Bug #963801 reported by Pascal Hahn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Graphite
Fix Released
High
Unassigned

Bug Description

When using the rule based router, there is a requirement for a default rule to be set up. My expectation was that the destination of the default rule is only being used if there is no other rule that has a matching pattern and a whitelisted destination.

The behavior is that the default rules' destination receives every datapoint, basically it's behaving like a standard rule with the .+ or similar pattern.

My proposal is to have change the behavior of the rule router to only use the default rule if there were no destinations found in all the other rules set up.

Patch attached.

Revision history for this message
Pascal Hahn (x-ph) wrote :
Revision history for this message
Michael Leinartas (mleinartas) wrote :

Hm.. I'll have to look at the source history to see how this bug was introduced. Your expectation is correct - the first rule that matches should cause processing to stop.

Revision history for this message
Michael Leinartas (mleinartas) wrote :

Thanks for the find and the patch. It looks like this broke in r521 during a refactor of the carbon-relay code. Along with a fix, I've added the ability to allow matched patterns to pass through when specified which makes it easier to copy a group of metrics.

Revision history for this message
Michael Leinartas (mleinartas) wrote :

Fix committed in r738

Changed in graphite:
importance: Undecided → High
milestone: none → 0.9.10
status: New → Fix Committed
Changed in graphite:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.