rhq-project/rhq — pull request #50 by metlos (2014-06-11 13:12:38+00:00)
Title: Always remember the last provided value in case of change operator on a numeric condition.

This fixes the inability to alert if the definition was created before
first value of the metric used in the condition arrives to the server.

This actually was quite serious, although maybe not that common - if you defined an alert definition for a change of a numeric metric (which is not something users usually do, because such occurrence is usually fairly frequent) and that alert definition was defined before the first value for that metric arrived to the server, the condition would NEVER evaluate to true until the caches for the given agent were reloaded (which could be a long time).

The fix is very simple - just make sure to always update the last known value, but I'm creating a PR for this anyway, because the change is in a highly sensitive area of the code base, so I'd appreciate another pair of eyes on this.