dianfu commented on code in PR #25965:
URL: https://github.com/apache/flink/pull/25965#discussion_r1913049536
##########
flink-python/src/main/java/org/apache/flink/streaming/api/runners/python/beam/BeamPythonFunctionRunner.java:
##########
@@ -681,7 +686,14 @@ public void onCompleted(BeamFnApi.ProcessBundleResponse
response) {
private TimerReceiverFactory createTimerReceiverFactory() {
BiConsumer<Timer<?>, TimerInternals.TimerData> timerDataConsumer =
- (timer, timerData) -> timerRegistration.setTimer((byte[])
timer.getUserKey());
+ (timer, timerData) ->
+ environment
+ .getMainMailboxExecutor()
Review Comment:
`environment.getMainMailboxExecutor()` has a side effect that it will create
MainMailboxExecutor instance each time called. What about making
MainMailboxExecutor an instance variable?
--
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]