rionmonster commented on code in PR #29658:
URL: https://github.com/apache/flink/pull/29658#discussion_r4413723145
##########
flink-runtime/src/main/java/org/apache/flink/streaming/api/operators/sorted/state/BatchExecutionKeyedStateBackend.java:
##########
@@ -104,8 +104,27 @@ public BatchExecutionKeyedStateBackend(
this.executionConfig = executionConfig;
}
+ /**
+ * Only allowed for the current key. Keys are processed one at a time, in
sorted order, and may
+ * only advance via {@link #moveToNextKey}: switching to another key here
would fire the
+ * outgoing key's timers early and drop its state, or revisit a key whose
state is already gone.
+ */
@Override
public void setCurrentKey(K newKey) {
+ if (!Objects.equals(newKey, currentKey)) {
Review Comment:
Thanks for the quick turnaround!
--
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]