-
Notifications
You must be signed in to change notification settings - Fork 559
Limit how long an actor may run actions per run #2077
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2077 +/- ##
==========================================
+ Coverage 72.72% 72.76% +0.03%
==========================================
Files 635 635
Lines 30372 30383 +11
Branches 3279 3281 +2
==========================================
+ Hits 22089 22107 +18
+ Misses 6387 6371 -16
- Partials 1896 1905 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Adds a time based limit for actions on an actor. actor-framework/actor-framework#2077
I briefly tested this out with our stack but ran into infinite loops when repeatedly re-enqueuing with a |
@tobim thanks for testing! What function are calling, exactly? Just always re-scheduling a new action from an action will be an infinite chain, so how does your workflow look like? Just from a high level, so that I can come up with a regression test. |
We are using The code is at https://github.com/tenzir/tenzir/blob/65b7c9eacc1e87f9f1d6c569db29826e2b86dec9/libtenzir/src/execution_node.cpp#L45-L52. |
@tobim I've made a small tweak, can you re-run your tests with that version and see if it maybe changes something for the better? |
Instead of adding a limit on how many actions an actor may process in one run, we introduce a new time-based limit. The default for an actor is to stop after 100ms. Users can override this value using the new configuration option `caf.scheduler.run-actions-timeout`.
Instead of adding a limit on how many actions an actor may process in one run, we introduce a new time-based limit. The default for an actor is to stop after 100ms. Users can override this value using the new configuration option
caf.scheduler.run-actions-timeout
.Relates #2032.