I have streaming job which listens to events, does operations on them using CEP.
Flow is
stream = source
.assignTimestampsAndWatermarks(...)
.filter(...);
CEP
.pattern(stream.keysBy(e-> e.getId()), pattern)
.process(PattenMatchProcessFunction)
.sink(...);
The keys are all short lived, and process function doesn't contains any state, to say state can be removed by setting ttl. Using EventTime characteristics
My question, how does flink handle the expired keys, would have any impact on the GC. If flink removes the keys itself then at what frequency does this happen.
Facing GC issues, job is getting stuck after deploying for 3 hours. Doing memory tuning, but want to eliminate this case.