Skip to content

Aggregations are not appropriately cleared #4

Closed
@euloh

Description

@euloh

Consider:

    BEGIN {
        @s = sum(1);
        printa(@s);
        printa(@s);
        printa(@s);
        exit(0)
    }

One sees the anticipated behavior -- "1" printed three times -- with DTv1. In contrast, with DTv2, the output is

                1
                2
                3

Or, consider

    'tick-5 { @s = sum(1); printa(@s); } tick-1100ms { exit(0) }'
    'tick-2s { @s = sum(1); printa(@s); } tick-11s { exit(0) }'

We would expect the aggregation to increase from 1 to 5, with it being printed five times along the way. The difference is the timing, and output can depend on buffering, aggregation rate, and so on. With DTv1, we observe

                5
                5
                5
                5
                5

("fast" firing rate) and

                1
                2
                3
                4
                5

("slow" firing rate) respectively, both reasonable results. In contrast, with DTv2, we get

                1
                3
                6
               10
               15

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions