You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Stephan Ewen (Jira)" <ji...@apache.org> on 2020/05/13 14:29:00 UTC

[jira] [Created] (FLINK-17671) Simplify the ManuallyTriggeredScheduledExecutortriggering logic

Stephan Ewen created FLINK-17671:
------------------------------------

             Summary: Simplify the ManuallyTriggeredScheduledExecutortriggering logic
                 Key: FLINK-17671
                 URL: https://issues.apache.org/jira/browse/FLINK-17671
             Project: Flink
          Issue Type: Improvement
          Components: Tests
            Reporter: Stephan Ewen
            Assignee: Stephan Ewen
             Fix For: 1.11.0


Currently, the ManuallyTriggeredScheduledExecutor for testing of actor-style components uses a complex dance to execute queued tasks. Even though the tasks are synchronously executed, they get get delegated via ComplatableFuture, using async supply of an execution stage, but with a synchronous executor injected via a lambda.

Sounds complicated, and it is. And for no reason, as far as I can tell. It does just as much (or as little) as directly calling {{run()}} on the enqueued task.

The advantage simply calling {{run()}} is that it is very easy to trace and for the debugger to step into. For the complex dance above, it becomes rather laborious and involved to try and find your way into the actual {{Runnable}} execution.

This fix proposes to simplify the trigger() method to call {{run()}} directly.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)