wso2 / streaming-integrator

A stream processing runtime that allows connecting any streaming data source to any destination and act on it
Apache License 2.0
113 stars 50 forks source link

[Aggregation] Memory usage can go high with infinite number of distinct groups produced by aggregation's 'group by' clause #169

Closed sybernix closed 3 years ago

sybernix commented 3 years ago

Description: As of now, when using aggregations, we maintain a bucket for each distinct group produced by the group by clause of the aggregation, in memory. Due to this, memory usage depends on the number of such distinct groups.

When the number of distinct groups is not finite, memory consumption will not be finite as well. In order to avoid this, we should avoid keeping these buckets in memory forever.

Related Issue: https://github.com/siddhi-io/siddhi/issues/1696

sybernix commented 3 years ago

Fixed with https://github.com/siddhi-io/siddhi/pull/1702