pnowojski commented on a change in pull request #10345: [FLINK-12484][runtime]
synchronize all mailbox actions
URL: https://github.com/apache/flink/pull/10345#discussion_r351842744
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
##########
@@ -384,57 +386,59 @@ protected Counter
setupNumRecordsInCounter(StreamOperator streamOperator) {
}
}
- @Override
- public final void invoke() throws Exception {
+ private void beforeInvoke() throws Exception {
Review comment:
@AHeise there is already an `init()` method, that's being invoked in the
middle of `beforeInvoke` :/ So without changing order of the invocations, I
don't see how a sub class could overload it and invoke `super.init()`.
After 10s of thinking I'm not sure if I can come up with a better name.
`beforeMailboxLoop`? not necessarily better. `prepareMailbox`? Not entirely
true...
I think fixing this issue would require some deep refactoring, as I think
the origin of this issue is how `StreamTask` is implemented as
`AbstractInvokable` inside (batch)`Task`. FYI, there are some plans to drop
`DataSet` API, and that would allow us to simplify the code here, which might
affect this discussion.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services