rkhachatryan commented on a change in pull request #19051:
URL: https://github.com/apache/flink/pull/19051#discussion_r826709921
##########
File path:
flink-state-backends/flink-statebackend-changelog/src/main/java/org/apache/flink/state/changelog/AbstractStateChangeLogger.java
##########
@@ -145,9 +145,17 @@ protected void log(
@Nullable ThrowingConsumer<DataOutputViewStreamWrapper,
IOException> dataWriter,
Ns ns)
throws IOException {
+ log(op, dataWriter, ns, keyContext.getCurrentKeyGroupIndex());
+ }
+
+ protected void log(
+ StateChangeOperation op,
+ @Nullable ThrowingConsumer<DataOutputViewStreamWrapper,
IOException> dataWriter,
+ Ns ns,
+ int keyGroup)
Review comment:
Indeed, your proposal is much more simple. However, I think it has
several drawbacks:
1. There could be other places where `eventTimeTimersQueue.poll()` or
`remove` is called. So it must be a (javadoc) contract that `setCurrentKey` is
required before `poll`
2. Following the above contract, `setCurrentKey` should also be called on
recovery (by `PriorityQueueStateChangeApplier` - similar to
`KvStateChangeApplier`)
--
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]