-
Notifications
You must be signed in to change notification settings - Fork 638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce ProcessingScheduleService #9730
Comments
Question raised from @npepinpe after the POC:
I think this is a bit unrelated to the topic and can be discussed with the PDT regarding the actor scheduler changes. The ProcessingScheduleService will have a really limited interface, which you can see above. |
Do you mean this one? interface SchedulingService {
Collection<Records> schedule(Duration d, Runnable r);
} |
No sorry. For example in the POC it looked like this: 176cfab#diff-f27601ec63a23e86b4a992a9cd4ac54192d81fbea9da126a8edeaa3b20123427R483-R487
We need to pass in an Supplier otherwise it doesn't work, the method itself can't return this. It depends now on #9724 how the result looks like, but this will be then the return of the Supplier or function or what ever is passed in. |
This comment came up during a discussion: #9756 (review)
For now, I didn't follow that suggestion and want to see whether we can do without it. |
9756: Hide scheduling behind interface r=pihme a=pihme ## Description In terms of the scope defined in #9730 this implements the following: - [x] Create a new interface for the ProcessingScheduleService (with narrowed scope) - [x] Possibily only two methods, runDelayed and runComplete take a look at the POC #9602 - [x] Implement the interface - [x] Before migrating to the new abstraction, migrate the ActorCOntrol#runAtFixedRate consumers to the #runDelayed usage, this means after each run the job needs to be scheduled again - [x] Migrate step by step the actorControl usage - [x] Remove the actor control from the ProcessingContext ## Related issues related to #9730 ## Review Hints * This is not the final form of the scheduling interface, instead the focus of this PR is to hide all the dependencies behind an interface first * The change is not a pure refactoring. So there is a residual risk that the behavior is different in subtle ways (which is why I would like to have a review by both of you) * The new code sometimes (indirectly) calls different methods on the `ActorControl`. Therefore there might be differences in the way tasks are scheduled (top of queue/bottom of queue; fast lane or not). The intention of the change was to simplify the interface that is available to the engine. In this regard some subtle changes are unavoidable * Part of the simplification is also that the engine does not have access to something like a `ScheduledTimer`. Therefore, the engine is unable to cancel tasks which have been scheduled * `RunAtFixedRate` has been replaced by tasks that reschedule themselves after they are called * There is a difference in the way exceptions are propagated. See commit message a406d3f for one such example * Other than that, the tests pass and I just started a QA run, so let's see 🤞 Co-authored-by: pihme <pihme@users.noreply.github.com>
10076: Engine abstraction remove legacy writer r=pihme a=pihme ## Description - Introduces a new task that can be scheduled by the engine and that can return records to be written - Replaces all references to `LegacyTypedStreamWriter`outside of stream processor with scheduling of the new tasks - The overall result is that the engine no longer depends on any writer that writes directly to the stream. Stream processor is now in full control of when and how records shall be written (Heureka!) ## Related issues related to #9724, #9730, #9725 Co-authored-by: pihme <pihme@users.noreply.github.com>
10076: Engine abstraction remove legacy writer r=pihme a=pihme ## Description - Introduces a new task that can be scheduled by the engine and that can return records to be written - Replaces all references to `LegacyTypedStreamWriter`outside of stream processor with scheduling of the new tasks - The overall result is that the engine no longer depends on any writer that writes directly to the stream. Stream processor is now in full control of when and how records shall be written (Heureka!) ## Related issues related to #9724, #9730, #9725 Co-authored-by: pihme <pihme@users.noreply.github.com>
10076: Engine abstraction remove legacy writer r=Zelldon a=pihme ## Description - Introduces a new task that can be scheduled by the engine and that can return records to be written - Replaces all references to `LegacyTypedStreamWriter`outside of stream processor with scheduling of the new tasks - The overall result is that the engine no longer depends on any writer that writes directly to the stream. Stream processor is now in full control of when and how records shall be written (Heureka!) ## Related issues related to #9724, #9730, #9725 Co-authored-by: pihme <pihme@users.noreply.github.com> Co-authored-by: Christopher Zell <zelldon91@googlemail.com>
Description
Part of #9600
Create an abstraction around the processing actor, since we want to remove the dependency and knowledge about the current execution model from the engine. This will simplify the tests as we can use a simple implementation for the execution and it should also help us to make further changes to the actor scheduler etc.
See
SchedulingService
in #9602 (comment)Todo:
Guarantee 2: We are not executed in parallel with processing (discussable, depends on the Writers and Result implementation)We removed this again Run ScheduledTasks during processing #10355Bonus: We might want to execute multiple delayed tasks on parallel maybe even in parallel during processing, for that we need to make sure that resources are not sharedThe consumer of the SchedulingService have only ReadOnly access to the databaseThis was not easily possibleThe text was updated successfully, but these errors were encountered: