hanyuzheng7 commented on code in PR #29658:
URL: https://github.com/apache/flink/pull/29658#discussion_r4405455881
##########
flink-runtime/src/main/java/org/apache/flink/streaming/api/operators/sorted/state/BatchExecutionKeyedStateBackend.java:
##########
@@ -127,7 +146,8 @@ public K getCurrentKey() {
@Override
public void setCurrentKeyAndKeyGroup(K newKey, int newKeyGroupIndex) {
- setCurrentKey(newKey);
+ // Used by the async state context switches, which are not checked for
key order yet.
+ moveToNextKey(newKey);
Review Comment:
I see the async path isn't checked yet. Since DataStream V2 keyed operators
always use async key-ordered processing, something like `applyToAllPartitions`
in endInput could still switch back to earlier keys and clear their state.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]