[
https://issues.apache.org/jira/browse/FLINK-9538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16505991#comment-16505991
]
ASF GitHub Bot commented on FLINK-9538:
---------------------------------------
Github user dawidwys commented on a diff in the pull request:
https://github.com/apache/flink/pull/6134#discussion_r194047289
--- Diff:
flink-runtime/src/test/java/org/apache/flink/runtime/state/StateBackendTestBase.java
---
@@ -3747,6 +3747,67 @@ public void process(Integer key, ListState<String>
state) throws Exception {
}
}
+ /**
+ * Since {@link AbstractKeyedStateBackend#getKeys(String, Object)}
does't support concurrent modification
+ * and {@link AbstractKeyedStateBackend#applyToAllKeys(Object,
TypeSerializer, StateDescriptor,
+ * KeyedStateFunction)} rely on it to get keys from backend. So we need
this unit test to verify the concurrent
+ * modification with {@link
AbstractKeyedStateBackend#applyToAllKeys(Object, TypeSerializer,
StateDescriptor, KeyedStateFunction)}.
+ */
+ @Test
+ public void
testConcurrentModificationWithApplyToAllKeysAndKeyedStateLambdaFunction()
throws Exception {
--- End diff --
Could you simplify the test to call the `applyToAllKeys` once.
> Make KeyedStateFunction an interface
> ------------------------------------
>
> Key: FLINK-9538
> URL: https://issues.apache.org/jira/browse/FLINK-9538
> Project: Flink
> Issue Type: Improvement
> Reporter: Dawid Wysakowicz
> Assignee: vinoyang
> Priority: Major
>
> I suggest to change the KeyedStateFunction from abstract class to interface
> (FunctionalInterface in particular) to enable passing lambdas.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)