-
Notifications
You must be signed in to change notification settings - Fork 579
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
Remove ActorControl#runUntilDone #9850
Conversation
Replaces the usage of `runUntilDone` in the retry mechanisms with a control return value. The old `yieldThread` is replaced with a recursive submit, and the old done simply does nothing. To trigger a retry, the mechanism simply has to return `Control.RETRY`.
Removes `ActorControl#runUntilDone` to avoid endless loops. This also inlines that any job not triggered by a subscription is always auto completing, and removes `ActorControl#done()`. We keep `ActorControl#yieldThread` for subscriptions/conditions for now, but these should be the only ones using it.
...her/src/test/java/io/camunda/zeebe/dispatcher/integration/ActorFrameworkIntegrationTest.java
Fixed
Show fixed
Hide fixed
The one failing test is a known flaky test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great 😍
I only have one suggestion to remove isAutoCompleting
, everything else LGTM 👍
scheduler/src/main/java/io/camunda/zeebe/scheduler/ActorJob.java
Outdated
Show resolved
Hide resolved
…ptions are auto completing
bors merge |
9850: Remove ActorControl#runUntilDone r=npepinpe a=npepinpe ## Description This PR removes the dangerous `ActorControl#runUntilDone` and replaces its usage with simple re-scheduling via `run` or `submit` or `runDelayed` where appropriate. At the same time, since we don't need it anymore, it also removes `ActorControl#done`. We keep `ActorControl#yieldThread` for jobs triggered by subscriptions/conditions (e.g. dispatcher subscriptions). This means only such jobs are not auto completing anymore (but they never had to call done). ## Related issues related to #8302 Co-authored-by: Nicolas Pepin-Perreault <nicolas.pepin-perreault@camunda.com>
Build failed: |
bors r+ |
Build succeeded: |
/backport |
Backport failed for Please cherry-pick the changes locally. git fetch origin stable/1.3
git worktree add -d .worktree/backport-9850-to-stable/1.3 origin/stable/1.3
cd .worktree/backport-9850-to-stable/1.3
git checkout -b backport-9850-to-stable/1.3
ancref=$(git merge-base bbbb0d3e8455efa051edde4a20e3152bc5e3636d df99b9451738dd9659b55b73b60fcf6ad96ebeaa)
git cherry-pick -x $ancref..df99b9451738dd9659b55b73b60fcf6ad96ebeaa |
Backport failed for Please cherry-pick the changes locally. git fetch origin stable/8.0
git worktree add -d .worktree/backport-9850-to-stable/8.0 origin/stable/8.0
cd .worktree/backport-9850-to-stable/8.0
git checkout -b backport-9850-to-stable/8.0
ancref=$(git merge-base bbbb0d3e8455efa051edde4a20e3152bc5e3636d df99b9451738dd9659b55b73b60fcf6ad96ebeaa)
git cherry-pick -x $ancref..df99b9451738dd9659b55b73b60fcf6ad96ebeaa |
9875: [Backport stable/8.0] Remove ActorControl#runUntilDone r=npepinpe a=npepinpe ## Description This PR backports #9850 to stable/8.0. There was one additional commit not in the PR which had to be backported/adapted, b052712. This is the last commit of the PR. ## Related issues backports #9850 related to #8302 Co-authored-by: Nicolas Pepin-Perreault <nicolas.pepin-perreault@camunda.com>
9876: [Backport stable/1.3] Remove ActorControl#runUntilDone r=npepinpe a=npepinpe ## Description This PR backports #9850 to stable/8.0. There was one additional commit not in the PR which had to be backported/adapted, b052712. This is the last commit of the PR. ## Related issues backports #9850 related to #8302 Co-authored-by: Nicolas Pepin-Perreault <nicolas.pepin-perreault@camunda.com>
Description
This PR removes the dangerous
ActorControl#runUntilDone
and replaces its usage with simple re-scheduling viarun
orsubmit
orrunDelayed
where appropriate. At the same time, since we don't need it anymore, it also removesActorControl#done
. We keepActorControl#yieldThread
for jobs triggered by subscriptions/conditions (e.g. dispatcher subscriptions). This means only such jobs are not auto completing anymore (but they never had to call done).Related issues
related to #8302
Definition of Done
Not all items need to be done depending on the issue and the pull request.
Code changes:
backport stable/1.3
) to the PR, in case that fails you need to create backports manually.Testing:
Documentation:
Please refer to our review guidelines.