IBM Streams 4.2

Defining the scope of consistent regions with primitive operators

When the @consistent annotation is applied to a primitive operator, the annotation indicates that the operator and the reachability graph of that operator participate in a consistent region. The annotated primitive operator is considered the start operator of the consistent region. The reachability graph of an operator is any other operator that the start operator reaches through all its outgoing stream connections, which means all the connections of all the output ports.

When the reachability graphs of different annotated primitive operators share a common operator, they form a single consistent region. When a single consistent region is formed by different annotations and those annotations have different parameter values, the SPL compiler assigns the value of each parameter by computing the maximum parameter value among the different annotations. If the value of one of the parameters is a submission-time value, then the value must be set during submission time.

The failure of any operator in the region results in a reset of the whole region.

The following figures show examples of how consistent regions are computed when the @consistent annotation is applied to primitive operators.

One primitive operator with one consistent region

The following figure shows an example of a primitive operator with the @consistent annotation. The consistent region is defined by the reachability graph of the annotated operator. In this example, operators op2-6 and op10 are in the reachability graph.

Although op4 has an input stream from the autonomous region that originates from op11, op4 and its downstream operators are treated as part of the consistent region.

Figure 1. One primitive operator with one consistent region
Graphic showing operators within a consistent region.

Primitive operators with separate consistent regions

The following figure shows an example with the @consistent annotation placed on two primitive operators (op1 and op7). The reachability graph of each operator does not form a single region because they do not share a common operator. As a result, two independent consistent regions are formed, which is shown by different patterns on operators in each region.

Figure 2. Primitive operators with separate consistent regions
Graphic showing operators within 2 consistent regions.