Viktor Feklin created FLINK-32480: ------------------------------------- Summary: Keyed State always returns new value instance Key: FLINK-32480 URL: https://issues.apache.org/jira/browse/FLINK-32480 Project: Flink Issue Type: Bug Components: API / State Processor Affects Versions: 1.14.6 Reporter: Viktor Feklin
I create ValueState with default value. Then i access value in the map function (multiple times with the same partition key). Expected behavior: * First call to value() should return new instance * Second call to value should return instance created in first call (just like Map#computeIfAbsent) Actual dehavior: * every call to value() return new instance until we manualy set it with update() function. According to source code - we can call update only once to assign value to current key. But from the user poin of view - it happends to call update() every time - because i do not know if value was already asigned or just created. -- This message was sent by Atlassian Jira (v8.20.10#820010)