Bug 1016763

Summary: Queue Threshold Alerts combinations behaviour in dependency of thresholds units
Product: Red Hat Enterprise MRG Reporter: Petra Svobodová <psvobodo>
Component: qpid-cppAssignee: messaging-bugs <messaging-bugs>
Status: CLOSED NOTABUG QA Contact: MRG Quality Engineering <mrgqe-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: DevelopmentCC: jross
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-25 06:51:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Example sketch none

Description Petra Svobodová 2013-10-08 16:09:50 UTC
Description of problem:

If "qpid.alert_count_down" is set together with "qpid.alert_size_up" (or "qpid.alert_size_down" is set with "qpid.alert_count_up") the "threshold crossed decreasing" is generated even in case of the count of messages (bytes) in the queue does not cross the lower threshold; look at the next example, please:

1. Run two receivers to catch threshold crossing events:
./drain --forever "qmf.default.topic/agent.ind.event.org_apache_qpid_broker.queueThresholdCrossedUpward.#"
./drain --forever qmf.default.topic/agent.ind.event.org_apache_qpid_broker.queueThresholdCrossedDownward.#"

2. In another terminal send messages to cross the upward threshold:
./spout --count 12 --content "xxxxxxxxxx" "threshold_queue; {create:always, node:{x-declare:{arguments:{'qpid.alert_count_down': 3,'qpid.alert_size_up':114}}}}"

The "Threshold crossed increasing" event is generated (should be OK).

3. Receive part of the messages to do not cross the lower threshold:
./drain --count 7 ""threshold_queue; {create:always, node:{x-declare:{arguments:{'qpid.alert_count_down': 3,'qpid.alert_size_up':114}}}}""

The "Threshold crossed decreasing" event is generated in this case, although there are still 5 messages in the "threshold_queue" (the lower threshold is set to 3 messages).

I am not sure if this testing scenario is relevant; which of combinations of settings are supported. Could you possibly look at the combinations of threshold values and write which of them are supported?

qpid.alert_count_down with qpid.alert_count_up - probably yes
qpid.alert_size_down with qpid.alert_size_up - probably yes
qpid.alert_count_down with qpid.alert_size_up ?
qpid.alert_size_down with qpid.alert_count_up ?
qpid.alert_size_down and qpid.alert_count_down with qpid.alert_size_up ?
qpid.alert_size_down and qpid.alert_count_down with qpid.alert_count_up ?
qpid.alert_size_down with qpid.alert_size_up and qpid.alert_count_up ?
qpid.alert_count_down with qpid.alert_size_up and qpid.alert_count_up ?
qpid.alert_size_down and qpid.alert_count_down with qpid.alert_size_up and qpid.alert_count_up ?

Version-Release number of selected component (if applicable):
qpid-cpp-0.22-18

How reproducible:
100%

Steps to Reproduce:
Try to follow steps above, please.

Actual results:
The "Threshold crossed decreasing" event is generated, although more messages (5) than set lower threshold (3) remain in the "threshold_queue"

Expected results:
The "Threshold crossed decreasing" event should not be generated in this case.

Comment 1 Petra Svobodová 2013-10-08 16:19:38 UTC
Created attachment 809397 [details]
Example sketch

The attached picture displays situation in the example above.

Comment 2 Petra Svobodová 2013-10-25 06:51:23 UTC
The behavior is affected by lower threshold, what is set automatically to one half of its respective upward threshold (size lower threshold in this case).

Ted, thank you for your explanation.

--> CLOSED - NOT A BUG