microsoft / Trill

Trill is a single-node query processor for temporal or streaming data.
MIT License
1.25k stars 133 forks source link

Update instance of aggregate's key in case consumer tracks its lifetime #157

Closed arunkm closed 3 years ago

arunkm commented 3 years ago

Trill keeps a reference to grouped key across event data spanning multiple window lifetimes. As long as the key remains similar (as per Equals/GetHashCode return value), the original key object is continued to be used - this causes problem in case the user depends on the life time of object (which is now much older) w.r.t rest of the data. This PR solves this by updating the grouping key even when it finds a similar old group key in its held state.