Thank you for taking the time to read this, I want to consult you experts on the Flink state TTL feature in Flink 1.8.0, after reading this, it is still vague to me.
I want to make sure where the TTL feature is enabled, is it on the key field or the value field. Particularly, say I have a mapState structure like this:
mapState = Map[String,List[String]]
e.g. val mapState = Map("haha" -> List("foo","bar")) in Scala
where "haha" is the key of the mapState and List("foo","bar") is the value
If I were to set a TTL of 1 minute on the mapState through the StateTtlConfig, then immediately (less than 1 minute) write to one of the values in List, say "foo".
Then after 1 minute, when the TTL fires, does the key "haha" expires or the value "bar" expires?
In other words, if it was to expire on the key, my understanding is that the mapState would remain intact
mapState = Map("haha" -> List("foo","bar"))
because writing to the value "foo" would reset the TTL on the key, thus the whole mapState stays the same
Another scenario is that if it was to expire on the value, the mapState would become
mapState = Map("haha" -> List("foo"))
because the value "bar" would expire after 1 minute without being accessed.
Hopefully, I made the question clear, Thank you in advance for any form of help.