Skip to content
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

fix: don't wait for actor being submitted #8993

Merged
merged 1 commit into from
Mar 28, 2022

Conversation

romansmirnov
Copy link
Member

@romansmirnov romansmirnov commented Mar 25, 2022

Description

  • Ensures that the activate jobs handler actor is submitted to the actor scheduler without blocking the actor thread
  • This requires the usage of CompletableFuture to get notified when the handler has been scheduled successfully
  • That way, the implementation works in case of an embedded and standalone gateway
  • Adjust test cases to avoid potential race conditions

Related issues

closes #8992

Definition of Done

Not all items need to be done depending on the issue and the pull request.

Code changes:

  • The changes are backwards compatibility with previous versions
  • If it fixes a bug then PRs are created to backport the fix to the last two minor versions. You can trigger a backport by assigning labels (e.g. backport stable/1.3) to the PR, in case that fails you need to create backports manually.

Testing:

  • There are unit/integration tests that verify all acceptance criterias of the issue
  • New tests are written to ensure backwards compatibility with further versions
  • The behavior is tested manually
  • The change has been verified by a QA run
  • The impact of the changes is verified by a benchmark

Documentation:

  • The documentation is updated (e.g. BPMN reference, configuration, examples, get-started guides, etc.)
  • New content is added to the release announcement
  • If the PR changes how BPMN processes are validated (e.g. support new BPMN element) then the Camunda modeling team should be informed to adjust the BPMN linting.

@romansmirnov romansmirnov force-pushed the rs-gateway-unblock branch 3 times, most recently from 316a0cf to 90b72f1 Compare March 25, 2022 19:49
Copy link
Member

@lenaschoenburg lenaschoenburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 I'm glad that you wrote a test for this.

bors r+

zeebe-bors-camunda bot added a commit that referenced this pull request Mar 28, 2022
8993: fix: don't wait for actor being submitted r=oleschoenburg a=romansmirnov

## Description

* Ensures that the activate jobs handler actor is submitted to the actor scheduler without blocking the actor thread
* This requires the usage of `CompletableFuture` to get notified when the handler has been scheduled successfully
* That way, the implementation works in case of an embedded and standalone gateway
* Adjust test cases to avoid potential race conditions

<!-- Please explain the changes you made here. -->

## Related issues

<!-- Which issues are closed by this PR or are related -->

closes #8992



Co-authored-by: Roman <roman.smirnov@camunda.com>
@zeebe-bors-camunda
Copy link
Contributor

Build failed:

@lenaschoenburg
Copy link
Member

bors retry

@zeebe-bors-camunda
Copy link
Contributor

@zeebe-bors-camunda zeebe-bors-camunda bot merged commit efeacd5 into main Mar 28, 2022
@zeebe-bors-camunda zeebe-bors-camunda bot deleted the rs-gateway-unblock branch March 28, 2022 10:03
@github-actions
Copy link
Contributor

Backport failed for stable/1.2, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git fetch origin stable/1.2
git worktree add -d .worktree/backport-8993-to-stable/1.2 origin/stable/1.2
cd .worktree/backport-8993-to-stable/1.2
git checkout -b backport-8993-to-stable/1.2
ancref=$(git merge-base d325919e7eef25f335c735088abb035dbfd58a8d 403942f036cdd9120d153f3f4b25cedd3d36fd13)
git cherry-pick -x $ancref..403942f036cdd9120d153f3f4b25cedd3d36fd13

@github-actions
Copy link
Contributor

Backport failed for stable/1.3, because it was unable to create a new branch.

Please cherry-pick the changes locally.

git fetch origin stable/1.3
git worktree add -d .worktree/backport-8993-to-stable/1.3 origin/stable/1.3
cd .worktree/backport-8993-to-stable/1.3
git checkout -b backport-8993-to-stable/1.3
ancref=$(git merge-base d325919e7eef25f335c735088abb035dbfd58a8d 403942f036cdd9120d153f3f4b25cedd3d36fd13)
git cherry-pick -x $ancref..403942f036cdd9120d153f3f4b25cedd3d36fd13

@lenaschoenburg
Copy link
Member

Apparently 1.2 does not have same bug. I wanted to just backport this PR but got a lot of conflicts (eg. EmbeddedGatewayServiceStep does not exist) so instead I just tried out the EmbeddedGatewayWithOneCpuThreadIT test on 1.2 and it passed 🤷

zeebe-bors-camunda bot added a commit that referenced this pull request Mar 29, 2022
9011: [Backport release-8.0.0] fix: don't wait for actor being submitted r=deepthidevaki a=oleschoenburg

## Description

Backport of #8993 for  `release-8.0.0`

Co-authored-by: Roman <roman.smirnov@camunda.com>
zeebe-bors-camunda bot added a commit that referenced this pull request Mar 29, 2022
9011: [Backport release-8.0.0] fix: don't wait for actor being submitted r=deepthidevaki a=oleschoenburg

## Description

Backport of #8993 for  `release-8.0.0`

Co-authored-by: Roman <roman.smirnov@camunda.com>
zeebe-bors-camunda bot added a commit that referenced this pull request Mar 29, 2022
9011: [Backport release-8.0.0] fix: don't wait for actor being submitted r=deepthidevaki a=oleschoenburg

## Description

Backport of #8993 for  `release-8.0.0`

Co-authored-by: Roman <roman.smirnov@camunda.com>
zeebe-bors-camunda bot added a commit that referenced this pull request Mar 29, 2022
9011: [Backport release-8.0.0] fix: don't wait for actor being submitted r=deepthidevaki a=oleschoenburg

## Description

Backport of #8993 for  `release-8.0.0`

Co-authored-by: Roman <roman.smirnov@camunda.com>
zeebe-bors-camunda bot added a commit that referenced this pull request Mar 29, 2022
9008: [Backport stable/1.3] fix: don't wait for actor being submitted r=deepthidevaki a=oleschoenburg

## Description

Manual backport of #8993 


Co-authored-by: Roman <roman.smirnov@camunda.com>
zeebe-bors-camunda bot added a commit that referenced this pull request Mar 29, 2022
9008: [Backport stable/1.3] fix: don't wait for actor being submitted r=deepthidevaki a=oleschoenburg

## Description

Manual backport of #8993 


Co-authored-by: Roman <roman.smirnov@camunda.com>
zeebe-bors-camunda bot added a commit that referenced this pull request Mar 30, 2022
9008: [Backport stable/1.3] fix: don't wait for actor being submitted r=deepthidevaki a=oleschoenburg

## Description

Manual backport of #8993 


9022: [Backport stable/1.3] chore(maven): add trailing slashes to new Artifactory URL r=oleschoenburg a=github-actions[bot]

# Description
Backport of #9017 to `stable/1.3`.

relates to 

Co-authored-by: Roman <roman.smirnov@camunda.com>
Co-authored-by: Christian Nicolai <christian.nicolai@camunda.com>
zeebe-bors-camunda bot added a commit that referenced this pull request Mar 30, 2022
9008: [Backport stable/1.3] fix: don't wait for actor being submitted r=deepthidevaki a=oleschoenburg

## Description

Manual backport of #8993 


Co-authored-by: Roman <roman.smirnov@camunda.com>
zeebe-bors-camunda bot added a commit that referenced this pull request Mar 30, 2022
9008: [Backport stable/1.3] fix: don't wait for actor being submitted r=deepthidevaki a=oleschoenburg

## Description

Manual backport of #8993 


Co-authored-by: Roman <roman.smirnov@camunda.com>
zeebe-bors-camunda bot added a commit that referenced this pull request Mar 30, 2022
9008: [Backport stable/1.3] fix: don't wait for actor being submitted r=deepthidevaki a=oleschoenburg

## Description

Manual backport of #8993 


Co-authored-by: Roman <roman.smirnov@camunda.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deadlock when starting Zeebe with only one CPU thread
3 participants