Bug 3484 - Filter constraints don't completely follow the spec
Summary: Filter constraints don't completely follow the spec
Status: NEW
Alias: None
Product: TAO
Classification: Unclassified
Component: Notification Service (show other bugs)
Version: 1.6.6
Hardware: All All
: P3 normal
Assignee: DOC Center Support List (internal)
URL:
Depends on:
Blocks:
 
Reported: 2008-10-31 13:25 CDT by Phil Mesnier
Modified: 2008-10-31 13:25 CDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Mesnier 2008-10-31 13:25:34 CDT
According to the CosNotification spec, formal/04-10-11, it should be possible to treat the variable_header component as a sequence, checking its length or finding a field by index. However in TAO's Notification service, this fails.

For instance, the spec gives this example:

($.header.variable_header[1].name ==  priority  and $.header.variable_header[1].value > 1163) or ($.header.variable_header[2].name ==  priority  and $.header.variable_header[2].value > 1163)

However this fails in TAO because when TAO binds an event to a constraint for filtering, the variable header fields are mapped to a hash table and the reference to the source event and its variable_header sequence are lost.

In addition to a failure to index the variable_header, the _length operator cannot be applied to the variable_header, or some of the other components that are associated with implicit ids in the constraint visitor. 

The solution to this problem is twofold, first, a reference to the variable_header sequence needs to be retained so that the sequence could be indexed, and then methods on Notify_Constraint_Visitor such as visit_array, and visit_special need to be modified so that the current_value_ member is not dereferenced without first checking that it is not null. If it is null, then the implicit_id_ must be checked to determine how to evaluate the current constraint.