State leak

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

State leak

orips
Hi,

When working with an ever growing key-space (let's say session ID), and a SessionWindow with a ProcessFunction - should we worry about the state growing indefinitely? Or does the window make sure to clean state after triggers?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: State leak

Rafi Aroch
Hi Ori,

Once a session ends, it's state should get purged. You should take care that a session does end.
For example, if you wait for a 'session-end' event, limit it with some time threshold. If it's defined with inactivity gap and your client sends infinite events, you could limit the session length to enforce a new session (may be simpler done on the client side).

Hope this helps,
Rafi


On Tue, Jun 23, 2020 at 5:11 PM Ori Popowski <[hidden email]> wrote:
Hi,

When working with an ever growing key-space (let's say session ID), and a SessionWindow with a ProcessFunction - should we worry about the state growing indefinitely? Or does the window make sure to clean state after triggers?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: State leak

orips
Hi, thanks for answering.

Sounds reasonable

On Wed, Jun 24, 2020 at 11:50 AM Rafi Aroch <[hidden email]> wrote:
Hi Ori,

Once a session ends, it's state should get purged. You should take care that a session does end.
For example, if you wait for a 'session-end' event, limit it with some time threshold. If it's defined with inactivity gap and your client sends infinite events, you could limit the session length to enforce a new session (may be simpler done on the client side).

Hope this helps,
Rafi


On Tue, Jun 23, 2020 at 5:11 PM Ori Popowski <[hidden email]> wrote:
Hi,

When working with an ever growing key-space (let's say session ID), and a SessionWindow with a ProcessFunction - should we worry about the state growing indefinitely? Or does the window make sure to clean state after triggers?

Thanks