StefanRRichter commented on a change in pull request #8442: [FLINK-12483]
Support (legacy) SourceFunction as special case in the mailbox model for stream
tasks
URL: https://github.com/apache/flink/pull/8442#discussion_r284667461
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SourceStreamTask.java
##########
@@ -98,12 +100,44 @@ protected void cleanup() {
}
@Override
- protected void run() throws Exception {
- headOperator.run(getCheckpointLock(),
getStreamStatusMaintainer());
+ protected void performDefaultAction(ActionContext context) throws
Exception {
+ // Against the usual contract of this method, this
implementation is not step-wise but blocking instead for
Review comment:
That suggestion would need an `if` in the default action that triggers for
the first invocation. Starting in another method, the question is which one and
we also probably require to join back in another place then.
What I mean is, the alternative loop does two things different:
- no invocation of default action.
- running all letters inside a `synchronized` block.
So the question that remains is, how you plan to add the synchronized block
to the existing mailbox loop? Personally I feel like this approach might be the
cleanest and most performant, but I would be open to suggestions for a complete
alternative if you have something in mind.
----------------------------------------------------------------
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