Hi all, I have a question regarding MapState. We a...
# troubleshooting
d
Hi all, I have a question regarding MapState. We are seeing ever growing checkpoint size in a flink application running in AWS KDA. While looking through the code, I had a hypothesis that MapState.remove() does not also actually clear the state, but rather just deallocates the space used by the MapState. This would mean that the checkpoint size would continue to grow, as the MapState would never get cleared. Can anybody confirm that this is the case? Does a MapState need to have .clear() run on it specifically to allow the garbage collector to free up that space?
For more context, we have a MapState which looks like key: timestamp, value: Listobject. We create the state upon open(). Then find the closest last 5 min interval for incoming objects. Then we will update the state so it looks like state[timestamp] = [object1, object2, object3] We set a timer to go off 5 minutes later, which will count all objects collected for that timestamp. Then we state.remove(timestamp) Could this increase the checkpoint size over time, since the state never gets .clear()?
m
Which state backend are you using?
d
Default would be RocksDB with incremental checkpoints enabled.
m
d
Yes AFAIK. @Daniel Suh can you confirm if triggering a savepoint results in the checkpoint size dropping? Which Flink version are you using?
d
@Martijn Visser I’m not seeing a backend specified, so it looks like according to htis: https://nightlies.apache.org/flink/flink-docs-master/docs/ops/state/state_backends/ it should be HashMapStateBackend
@Danny Cranmer we are using 1.8.3. Let me look into the savepoint dropping the checkpoint size